var i0=Object.defineProperty;var dp=r=>{throw TypeError(r)};var a0=(r,t,s)=>t in r?i0(r,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):r[t]=s;var Ie=(r,t,s)=>a0(r,typeof t!="symbol"?t+"":t,s),Bu=(r,t,s)=>t.has(r)||dp("Cannot "+s);var R=(r,t,s)=>(Bu(r,t,"read from private field"),s?s.call(r):t.get(r)),pe=(r,t,s)=>t.has(r)?dp("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(r):t.set(r,s),ee=(r,t,s,o)=>(Bu(r,t,"write to private field"),o?o.call(r,s):t.set(r,s),s),Pe=(r,t,s)=>(Bu(r,t,"access private method"),s);var wa=(r,t,s,o)=>({set _(a){ee(r,t,a,s)},get _(){return R(r,t,o)}});function l0(r,t){for(var s=0;so[a]})}}}return Object.freeze(Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))o(a);new MutationObserver(a=>{for(const u of a)if(u.type==="childList")for(const d of u.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&o(d)}).observe(document,{childList:!0,subtree:!0});function s(a){const u={};return a.integrity&&(u.integrity=a.integrity),a.referrerPolicy&&(u.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?u.credentials="include":a.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function o(a){if(a.ep)return;a.ep=!0;const u=s(a);fetch(a.href,u)}})();function Vc(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var $u={exports:{}},Io={},Vu={exports:{}},be={};/** * @license React * react.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var fp;function u0(){if(fp)return be;fp=1;var r=Symbol.for("react.element"),t=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),u=Symbol.for("react.provider"),d=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),v=Symbol.iterator;function C(O){return O===null||typeof O!="object"?null:(O=v&&O[v]||O["@@iterator"],typeof O=="function"?O:null)}var L={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},F=Object.assign,k={};function w(O,z,ce){this.props=O,this.context=z,this.refs=k,this.updater=ce||L}w.prototype.isReactComponent={},w.prototype.setState=function(O,z){if(typeof O!="object"&&typeof O!="function"&&O!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,O,z,"setState")},w.prototype.forceUpdate=function(O){this.updater.enqueueForceUpdate(this,O,"forceUpdate")};function S(){}S.prototype=w.prototype;function I(O,z,ce){this.props=O,this.context=z,this.refs=k,this.updater=ce||L}var P=I.prototype=new S;P.constructor=I,F(P,w.prototype),P.isPureReactComponent=!0;var A=Array.isArray,V=Object.prototype.hasOwnProperty,$={current:null},G={key:!0,ref:!0,__self:!0,__source:!0};function B(O,z,ce){var me,he={},J=null,ve=null;if(z!=null)for(me in z.ref!==void 0&&(ve=z.ref),z.key!==void 0&&(J=""+z.key),z)V.call(z,me)&&!G.hasOwnProperty(me)&&(he[me]=z[me]);var Re=arguments.length-2;if(Re===1)he.children=ce;else if(1>>1,z=K[O];if(0>>1;Oa(he,U))Ja(ve,he)?(K[O]=ve,K[J]=U,O=J):(K[O]=he,K[me]=U,O=me);else if(Ja(ve,U))K[O]=ve,K[J]=U,O=J;else break e}}return ae}function a(K,ae){var U=K.sortIndex-ae.sortIndex;return U!==0?U:K.id-ae.id}if(typeof performance=="object"&&typeof performance.now=="function"){var u=performance;r.unstable_now=function(){return u.now()}}else{var d=Date,h=d.now();r.unstable_now=function(){return d.now()-h}}var p=[],m=[],g=1,v=null,C=3,L=!1,F=!1,k=!1,w=typeof setTimeout=="function"?setTimeout:null,S=typeof clearTimeout=="function"?clearTimeout:null,I=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function P(K){for(var ae=s(m);ae!==null;){if(ae.callback===null)o(m);else if(ae.startTime<=K)o(m),ae.sortIndex=ae.expirationTime,t(p,ae);else break;ae=s(m)}}function A(K){if(k=!1,P(K),!F)if(s(p)!==null)F=!0,Ee(V);else{var ae=s(m);ae!==null&&ke(A,ae.startTime-K)}}function V(K,ae){F=!1,k&&(k=!1,S(B),B=-1),L=!0;var U=C;try{for(P(ae),v=s(p);v!==null&&(!(v.expirationTime>ae)||K&&!Se());){var O=v.callback;if(typeof O=="function"){v.callback=null,C=v.priorityLevel;var z=O(v.expirationTime<=ae);ae=r.unstable_now(),typeof z=="function"?v.callback=z:v===s(p)&&o(p),P(ae)}else o(p);v=s(p)}if(v!==null)var ce=!0;else{var me=s(m);me!==null&&ke(A,me.startTime-ae),ce=!1}return ce}finally{v=null,C=U,L=!1}}var $=!1,G=null,B=-1,ie=5,ue=-1;function Se(){return!(r.unstable_now()-ueK||125O?(K.sortIndex=U,t(m,K),s(p)===null&&K===s(m)&&(k?(S(B),B=-1):k=!0,ke(A,U-O))):(K.sortIndex=z,t(p,K),F||L||(F=!0,Ee(V))),K},r.unstable_shouldYield=Se,r.unstable_wrapCallback=function(K){var ae=C;return function(){var U=C;C=ae;try{return K.apply(this,arguments)}finally{C=U}}}})(Wu)),Wu}var gp;function h0(){return gp||(gp=1,qu.exports=f0()),qu.exports}/** * @license React * react-dom.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var vp;function p0(){if(vp)return Tt;vp=1;var r=Hc(),t=h0();function s(e){for(var n="https://reactjs.org/docs/error-decoder.html?invariant="+e,i=1;i"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),p=Object.prototype.hasOwnProperty,m=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,g={},v={};function C(e){return p.call(v,e)?!0:p.call(g,e)?!1:m.test(e)?v[e]=!0:(g[e]=!0,!1)}function L(e,n,i,l){if(i!==null&&i.type===0)return!1;switch(typeof n){case"function":case"symbol":return!0;case"boolean":return l?!1:i!==null?!i.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function F(e,n,i,l){if(n===null||typeof n>"u"||L(e,n,i,l))return!0;if(l)return!1;if(i!==null)switch(i.type){case 3:return!n;case 4:return n===!1;case 5:return isNaN(n);case 6:return isNaN(n)||1>n}return!1}function k(e,n,i,l,c,f,y){this.acceptsBooleans=n===2||n===3||n===4,this.attributeName=l,this.attributeNamespace=c,this.mustUseProperty=i,this.propertyName=e,this.type=n,this.sanitizeURL=f,this.removeEmptyString=y}var w={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){w[e]=new k(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var n=e[0];w[n]=new k(n,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){w[e]=new k(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){w[e]=new k(e,2,!1,e,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){w[e]=new k(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){w[e]=new k(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){w[e]=new k(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){w[e]=new k(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){w[e]=new k(e,5,!1,e.toLowerCase(),null,!1,!1)});var S=/[\-:]([a-z])/g;function I(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var n=e.replace(S,I);w[n]=new k(n,1,!1,e,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var n=e.replace(S,I);w[n]=new k(n,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var n=e.replace(S,I);w[n]=new k(n,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){w[e]=new k(e,1,!1,e.toLowerCase(),null,!1,!1)}),w.xlinkHref=new k("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){w[e]=new k(e,1,!1,e.toLowerCase(),null,!0,!0)});function P(e,n,i,l){var c=w.hasOwnProperty(n)?w[n]:null;(c!==null?c.type!==0:l||!(2x||c[y]!==f[x]){var b=` `+c[y].replace(" at new "," at ");return e.displayName&&b.includes("")&&(b=b.replace("",e.displayName)),b}while(1<=y&&0<=x);break}}}finally{ce=!1,Error.prepareStackTrace=i}return(e=e?e.displayName||e.name:"")?z(e):""}function he(e){switch(e.tag){case 5:return z(e.type);case 16:return z("Lazy");case 13:return z("Suspense");case 19:return z("SuspenseList");case 0:case 2:case 15:return e=me(e.type,!1),e;case 11:return e=me(e.type.render,!1),e;case 1:return e=me(e.type,!0),e;default:return""}}function J(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case G:return"Fragment";case $:return"Portal";case ie:return"Profiler";case B:return"StrictMode";case xe:return"Suspense";case Y:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Se:return(e.displayName||"Context")+".Consumer";case ue:return(e._context.displayName||"Context")+".Provider";case Te:var n=e.render;return e=e.displayName,e||(e=n.displayName||n.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case _e:return n=e.displayName||null,n!==null?n:J(e.type)||"Memo";case Ee:n=e._payload,e=e._init;try{return J(e(n))}catch{}}return null}function ve(e){var n=e.type;switch(e.tag){case 24:return"Cache";case 9:return(n.displayName||"Context")+".Consumer";case 10:return(n._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=n.render,e=e.displayName||e.name||"",n.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return n;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return J(n);case 8:return n===B?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof n=="function")return n.displayName||n.name||null;if(typeof n=="string")return n}return null}function Re(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function ge(e){var n=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function tt(e){var n=ge(e)?"checked":"value",i=Object.getOwnPropertyDescriptor(e.constructor.prototype,n),l=""+e[n];if(!e.hasOwnProperty(n)&&typeof i<"u"&&typeof i.get=="function"&&typeof i.set=="function"){var c=i.get,f=i.set;return Object.defineProperty(e,n,{configurable:!0,get:function(){return c.call(this)},set:function(y){l=""+y,f.call(this,y)}}),Object.defineProperty(e,n,{enumerable:i.enumerable}),{getValue:function(){return l},setValue:function(y){l=""+y},stopTracking:function(){e._valueTracker=null,delete e[n]}}}}function Mt(e){e._valueTracker||(e._valueTracker=tt(e))}function it(e){if(!e)return!1;var n=e._valueTracker;if(!n)return!0;var i=n.getValue(),l="";return e&&(l=ge(e)?e.checked?"true":"false":e.value),e=l,e!==i?(n.setValue(e),!0):!1}function Gt(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Ft(e,n){var i=n.checked;return U({},n,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:i??e._wrapperState.initialChecked})}function Ut(e,n){var i=n.defaultValue==null?"":n.defaultValue,l=n.checked!=null?n.checked:n.defaultChecked;i=Re(n.value!=null?n.value:i),e._wrapperState={initialChecked:l,initialValue:i,controlled:n.type==="checkbox"||n.type==="radio"?n.checked!=null:n.value!=null}}function we(e,n){n=n.checked,n!=null&&P(e,"checked",n,!1)}function at(e,n){we(e,n);var i=Re(n.value),l=n.type;if(i!=null)l==="number"?(i===0&&e.value===""||e.value!=i)&&(e.value=""+i):e.value!==""+i&&(e.value=""+i);else if(l==="submit"||l==="reset"){e.removeAttribute("value");return}n.hasOwnProperty("value")?Xt(e,n.type,i):n.hasOwnProperty("defaultValue")&&Xt(e,n.type,Re(n.defaultValue)),n.checked==null&&n.defaultChecked!=null&&(e.defaultChecked=!!n.defaultChecked)}function Jt(e,n,i){if(n.hasOwnProperty("value")||n.hasOwnProperty("defaultValue")){var l=n.type;if(!(l!=="submit"&&l!=="reset"||n.value!==void 0&&n.value!==null))return;n=""+e._wrapperState.initialValue,i||n===e.value||(e.value=n),e.defaultValue=n}i=e.name,i!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,i!==""&&(e.name=i)}function Xt(e,n,i){(n!=="number"||Gt(e.ownerDocument)!==e)&&(i==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+i&&(e.defaultValue=""+i))}var Dn=Array.isArray;function jn(e,n,i,l){if(e=e.options,n){n={};for(var c=0;c"+n.valueOf().toString()+"",n=di.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;n.firstChild;)e.appendChild(n.firstChild)}});function Gs(e,n){if(n){var i=e.firstChild;if(i&&i===e.lastChild&&i.nodeType===3){i.nodeValue=n;return}}e.textContent=n}var Js={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},cv=["Webkit","ms","Moz","O"];Object.keys(Js).forEach(function(e){cv.forEach(function(n){n=n+e.charAt(0).toUpperCase()+e.substring(1),Js[n]=Js[e]})});function Cd(e,n,i){return n==null||typeof n=="boolean"||n===""?"":i||typeof n!="number"||n===0||Js.hasOwnProperty(e)&&Js[e]?(""+n).trim():n+"px"}function bd(e,n){e=e.style;for(var i in n)if(n.hasOwnProperty(i)){var l=i.indexOf("--")===0,c=Cd(i,n[i],l);i==="float"&&(i="cssFloat"),l?e.setProperty(i,c):e[i]=c}}var dv=U({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Za(e,n){if(n){if(dv[e]&&(n.children!=null||n.dangerouslySetInnerHTML!=null))throw Error(s(137,e));if(n.dangerouslySetInnerHTML!=null){if(n.children!=null)throw Error(s(60));if(typeof n.dangerouslySetInnerHTML!="object"||!("__html"in n.dangerouslySetInnerHTML))throw Error(s(61))}if(n.style!=null&&typeof n.style!="object")throw Error(s(62))}}function el(e,n){if(e.indexOf("-")===-1)return typeof n.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var tl=null;function nl(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var rl=null,rs=null,ss=null;function Rd(e){if(e=wo(e)){if(typeof rl!="function")throw Error(s(280));var n=e.stateNode;n&&(n=Ii(n),rl(e.stateNode,e.type,n))}}function Td(e){rs?ss?ss.push(e):ss=[e]:rs=e}function Pd(){if(rs){var e=rs,n=ss;if(ss=rs=null,Rd(e),n)for(e=0;e>>=0,e===0?32:31-(Ev(e)/_v|0)|0}var yi=64,gi=4194304;function eo(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function vi(e,n){var i=e.pendingLanes;if(i===0)return 0;var l=0,c=e.suspendedLanes,f=e.pingedLanes,y=i&268435455;if(y!==0){var x=y&~c;x!==0?l=eo(x):(f&=y,f!==0&&(l=eo(f)))}else y=i&~c,y!==0?l=eo(y):f!==0&&(l=eo(f));if(l===0)return 0;if(n!==0&&n!==l&&(n&c)===0&&(c=l&-l,f=n&-n,c>=f||c===16&&(f&4194240)!==0))return n;if((l&4)!==0&&(l|=i&16),n=e.entangledLanes,n!==0)for(e=e.entanglements,n&=l;0i;i++)n.push(e);return n}function to(e,n,i){e.pendingLanes|=n,n!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,n=31-Yt(n),e[n]=i}function Rv(e,n){var i=e.pendingLanes&~n;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=n,e.mutableReadLanes&=n,e.entangledLanes&=n,n=e.entanglements;var l=e.eventTimes;for(e=e.expirationTimes;0=uo),rf=" ",sf=!1;function of(e,n){switch(e){case"keyup":return tw.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function af(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var as=!1;function rw(e,n){switch(e){case"compositionend":return af(n);case"keypress":return n.which!==32?null:(sf=!0,rf);case"textInput":return e=n.data,e===rf&&sf?null:e;default:return null}}function sw(e,n){if(as)return e==="compositionend"||!Sl&&of(e,n)?(e=Xd(),_i=ml=Bn=null,as=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1=n)return{node:i,offset:n-e};e=l}e:{for(;i;){if(i.nextSibling){i=i.nextSibling;break e}i=i.parentNode}i=void 0}i=pf(i)}}function yf(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?yf(e,n.parentNode):"contains"in e?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function gf(){for(var e=window,n=Gt();n instanceof e.HTMLIFrameElement;){try{var i=typeof n.contentWindow.location.href=="string"}catch{i=!1}if(i)e=n.contentWindow;else break;n=Gt(e.document)}return n}function kl(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n&&(n==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||n==="textarea"||e.contentEditable==="true")}function hw(e){var n=gf(),i=e.focusedElem,l=e.selectionRange;if(n!==i&&i&&i.ownerDocument&&yf(i.ownerDocument.documentElement,i)){if(l!==null&&kl(i)){if(n=l.start,e=l.end,e===void 0&&(e=n),"selectionStart"in i)i.selectionStart=n,i.selectionEnd=Math.min(e,i.value.length);else if(e=(n=i.ownerDocument||document)&&n.defaultView||window,e.getSelection){e=e.getSelection();var c=i.textContent.length,f=Math.min(l.start,c);l=l.end===void 0?f:Math.min(l.end,c),!e.extend&&f>l&&(c=l,l=f,f=c),c=mf(i,f);var y=mf(i,l);c&&y&&(e.rangeCount!==1||e.anchorNode!==c.node||e.anchorOffset!==c.offset||e.focusNode!==y.node||e.focusOffset!==y.offset)&&(n=n.createRange(),n.setStart(c.node,c.offset),e.removeAllRanges(),f>l?(e.addRange(n),e.extend(y.node,y.offset)):(n.setEnd(y.node,y.offset),e.addRange(n)))}}for(n=[],e=i;e=e.parentNode;)e.nodeType===1&&n.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof i.focus=="function"&&i.focus(),i=0;i=document.documentMode,ls=null,Cl=null,po=null,bl=!1;function vf(e,n,i){var l=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;bl||ls==null||ls!==Gt(l)||(l=ls,"selectionStart"in l&&kl(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),po&&ho(po,l)||(po=l,l=Ni(Cl,"onSelect"),0hs||(e.current=Fl[hs],Fl[hs]=null,hs--)}function Fe(e,n){hs++,Fl[hs]=e.current,e.current=n}var qn={},ht=Hn(qn),_t=Hn(!1),Er=qn;function ps(e,n){var i=e.type.contextTypes;if(!i)return qn;var l=e.stateNode;if(l&&l.__reactInternalMemoizedUnmaskedChildContext===n)return l.__reactInternalMemoizedMaskedChildContext;var c={},f;for(f in i)c[f]=n[f];return l&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=n,e.__reactInternalMemoizedMaskedChildContext=c),c}function kt(e){return e=e.childContextTypes,e!=null}function Di(){ze(_t),ze(ht)}function Lf(e,n,i){if(ht.current!==qn)throw Error(s(168));Fe(ht,n),Fe(_t,i)}function If(e,n,i){var l=e.stateNode;if(n=n.childContextTypes,typeof l.getChildContext!="function")return i;l=l.getChildContext();for(var c in l)if(!(c in n))throw Error(s(108,ve(e)||"Unknown",c));return U({},i,l)}function ji(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||qn,Er=ht.current,Fe(ht,e),Fe(_t,_t.current),!0}function Df(e,n,i){var l=e.stateNode;if(!l)throw Error(s(169));i?(e=If(e,n,Er),l.__reactInternalMemoizedMergedChildContext=e,ze(_t),ze(ht),Fe(ht,e)):ze(_t),Fe(_t,i)}var _n=null,Mi=!1,Ul=!1;function jf(e){_n===null?_n=[e]:_n.push(e)}function Cw(e){Mi=!0,jf(e)}function Wn(){if(!Ul&&_n!==null){Ul=!0;var e=0,n=je;try{var i=_n;for(je=1;e>=y,c-=y,kn=1<<32-Yt(n)+c|i<ye?(st=fe,fe=null):st=fe.sibling;var Le=H(D,fe,j[ye],Q);if(Le===null){fe===null&&(fe=st);break}e&&fe&&Le.alternate===null&&n(D,fe),T=f(Le,T,ye),de===null?le=Le:de.sibling=Le,de=Le,fe=st}if(ye===j.length)return i(D,fe),Be&&kr(D,ye),le;if(fe===null){for(;yeye?(st=fe,fe=null):st=fe.sibling;var tr=H(D,fe,Le.value,Q);if(tr===null){fe===null&&(fe=st);break}e&&fe&&tr.alternate===null&&n(D,fe),T=f(tr,T,ye),de===null?le=tr:de.sibling=tr,de=tr,fe=st}if(Le.done)return i(D,fe),Be&&kr(D,ye),le;if(fe===null){for(;!Le.done;ye++,Le=j.next())Le=W(D,Le.value,Q),Le!==null&&(T=f(Le,T,ye),de===null?le=Le:de.sibling=Le,de=Le);return Be&&kr(D,ye),le}for(fe=l(D,fe);!Le.done;ye++,Le=j.next())Le=Z(fe,D,ye,Le.value,Q),Le!==null&&(e&&Le.alternate!==null&&fe.delete(Le.key===null?ye:Le.key),T=f(Le,T,ye),de===null?le=Le:de.sibling=Le,de=Le);return e&&fe.forEach(function(o0){return n(D,o0)}),Be&&kr(D,ye),le}function Qe(D,T,j,Q){if(typeof j=="object"&&j!==null&&j.type===G&&j.key===null&&(j=j.props.children),typeof j=="object"&&j!==null){switch(j.$$typeof){case V:e:{for(var le=j.key,de=T;de!==null;){if(de.key===le){if(le=j.type,le===G){if(de.tag===7){i(D,de.sibling),T=c(de,j.props.children),T.return=D,D=T;break e}}else if(de.elementType===le||typeof le=="object"&&le!==null&&le.$$typeof===Ee&&$f(le)===de.type){i(D,de.sibling),T=c(de,j.props),T.ref=xo(D,de,j),T.return=D,D=T;break e}i(D,de);break}else n(D,de);de=de.sibling}j.type===G?(T=Ar(j.props.children,D.mode,Q,j.key),T.return=D,D=T):(Q=da(j.type,j.key,j.props,null,D.mode,Q),Q.ref=xo(D,T,j),Q.return=D,D=Q)}return y(D);case $:e:{for(de=j.key;T!==null;){if(T.key===de)if(T.tag===4&&T.stateNode.containerInfo===j.containerInfo&&T.stateNode.implementation===j.implementation){i(D,T.sibling),T=c(T,j.children||[]),T.return=D,D=T;break e}else{i(D,T);break}else n(D,T);T=T.sibling}T=ju(j,D.mode,Q),T.return=D,D=T}return y(D);case Ee:return de=j._init,Qe(D,T,de(j._payload),Q)}if(Dn(j))return ne(D,T,j,Q);if(ae(j))return oe(D,T,j,Q);Bi(D,j)}return typeof j=="string"&&j!==""||typeof j=="number"?(j=""+j,T!==null&&T.tag===6?(i(D,T.sibling),T=c(T,j),T.return=D,D=T):(i(D,T),T=Du(j,D.mode,Q),T.return=D,D=T),y(D)):i(D,T)}return Qe}var vs=Vf(!0),Hf=Vf(!1),$i=Hn(null),Vi=null,ws=null,ql=null;function Wl(){ql=ws=Vi=null}function Ql(e){var n=$i.current;ze($i),e._currentValue=n}function Kl(e,n,i){for(;e!==null;){var l=e.alternate;if((e.childLanes&n)!==n?(e.childLanes|=n,l!==null&&(l.childLanes|=n)):l!==null&&(l.childLanes&n)!==n&&(l.childLanes|=n),e===i)break;e=e.return}}function xs(e,n){Vi=e,ql=ws=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&n)!==0&&(Ct=!0),e.firstContext=null)}function $t(e){var n=e._currentValue;if(ql!==e)if(e={context:e,memoizedValue:n,next:null},ws===null){if(Vi===null)throw Error(s(308));ws=e,Vi.dependencies={lanes:0,firstContext:e}}else ws=ws.next=e;return n}var Cr=null;function Gl(e){Cr===null?Cr=[e]:Cr.push(e)}function qf(e,n,i,l){var c=n.interleaved;return c===null?(i.next=i,Gl(n)):(i.next=c.next,c.next=i),n.interleaved=i,bn(e,l)}function bn(e,n){e.lanes|=n;var i=e.alternate;for(i!==null&&(i.lanes|=n),i=e,e=e.return;e!==null;)e.childLanes|=n,i=e.alternate,i!==null&&(i.childLanes|=n),i=e,e=e.return;return i.tag===3?i.stateNode:null}var Qn=!1;function Jl(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Wf(e,n){e=e.updateQueue,n.updateQueue===e&&(n.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Rn(e,n){return{eventTime:e,lane:n,tag:0,payload:null,callback:null,next:null}}function Kn(e,n,i){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(Ae&2)!==0){var c=l.pending;return c===null?n.next=n:(n.next=c.next,c.next=n),l.pending=n,bn(e,i)}return c=l.interleaved,c===null?(n.next=n,Gl(l)):(n.next=c.next,c.next=n),l.interleaved=n,bn(e,i)}function Hi(e,n,i){if(n=n.updateQueue,n!==null&&(n=n.shared,(i&4194240)!==0)){var l=n.lanes;l&=e.pendingLanes,i|=l,n.lanes=i,cl(e,i)}}function Qf(e,n){var i=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,i===l)){var c=null,f=null;if(i=i.firstBaseUpdate,i!==null){do{var y={eventTime:i.eventTime,lane:i.lane,tag:i.tag,payload:i.payload,callback:i.callback,next:null};f===null?c=f=y:f=f.next=y,i=i.next}while(i!==null);f===null?c=f=n:f=f.next=n}else c=f=n;i={baseState:l.baseState,firstBaseUpdate:c,lastBaseUpdate:f,shared:l.shared,effects:l.effects},e.updateQueue=i;return}e=i.lastBaseUpdate,e===null?i.firstBaseUpdate=n:e.next=n,i.lastBaseUpdate=n}function qi(e,n,i,l){var c=e.updateQueue;Qn=!1;var f=c.firstBaseUpdate,y=c.lastBaseUpdate,x=c.shared.pending;if(x!==null){c.shared.pending=null;var b=x,M=b.next;b.next=null,y===null?f=M:y.next=M,y=b;var q=e.alternate;q!==null&&(q=q.updateQueue,x=q.lastBaseUpdate,x!==y&&(x===null?q.firstBaseUpdate=M:x.next=M,q.lastBaseUpdate=b))}if(f!==null){var W=c.baseState;y=0,q=M=b=null,x=f;do{var H=x.lane,Z=x.eventTime;if((l&H)===H){q!==null&&(q=q.next={eventTime:Z,lane:0,tag:x.tag,payload:x.payload,callback:x.callback,next:null});e:{var ne=e,oe=x;switch(H=n,Z=i,oe.tag){case 1:if(ne=oe.payload,typeof ne=="function"){W=ne.call(Z,W,H);break e}W=ne;break e;case 3:ne.flags=ne.flags&-65537|128;case 0:if(ne=oe.payload,H=typeof ne=="function"?ne.call(Z,W,H):ne,H==null)break e;W=U({},W,H);break e;case 2:Qn=!0}}x.callback!==null&&x.lane!==0&&(e.flags|=64,H=c.effects,H===null?c.effects=[x]:H.push(x))}else Z={eventTime:Z,lane:H,tag:x.tag,payload:x.payload,callback:x.callback,next:null},q===null?(M=q=Z,b=W):q=q.next=Z,y|=H;if(x=x.next,x===null){if(x=c.shared.pending,x===null)break;H=x,x=H.next,H.next=null,c.lastBaseUpdate=H,c.shared.pending=null}}while(!0);if(q===null&&(b=W),c.baseState=b,c.firstBaseUpdate=M,c.lastBaseUpdate=q,n=c.shared.interleaved,n!==null){c=n;do y|=c.lane,c=c.next;while(c!==n)}else f===null&&(c.shared.lanes=0);Tr|=y,e.lanes=y,e.memoizedState=W}}function Kf(e,n,i){if(e=n.effects,n.effects=null,e!==null)for(n=0;ni?i:4,e(!0);var l=tu.transition;tu.transition={};try{e(!1),n()}finally{je=i,tu.transition=l}}function hh(){return Vt().memoizedState}function Pw(e,n,i){var l=Yn(e);if(i={lane:l,action:i,hasEagerState:!1,eagerState:null,next:null},ph(e))mh(n,i);else if(i=qf(e,n,i,l),i!==null){var c=St();sn(i,e,l,c),yh(i,n,l)}}function Ow(e,n,i){var l=Yn(e),c={lane:l,action:i,hasEagerState:!1,eagerState:null,next:null};if(ph(e))mh(n,c);else{var f=e.alternate;if(e.lanes===0&&(f===null||f.lanes===0)&&(f=n.lastRenderedReducer,f!==null))try{var y=n.lastRenderedState,x=f(y,i);if(c.hasEagerState=!0,c.eagerState=x,Zt(x,y)){var b=n.interleaved;b===null?(c.next=c,Gl(n)):(c.next=b.next,b.next=c),n.interleaved=c;return}}catch{}finally{}i=qf(e,n,c,l),i!==null&&(c=St(),sn(i,e,l,c),yh(i,n,l))}}function ph(e){var n=e.alternate;return e===Ve||n!==null&&n===Ve}function mh(e,n){ko=Ki=!0;var i=e.pending;i===null?n.next=n:(n.next=i.next,i.next=n),e.pending=n}function yh(e,n,i){if((i&4194240)!==0){var l=n.lanes;l&=e.pendingLanes,i|=l,n.lanes=i,cl(e,i)}}var Xi={readContext:$t,useCallback:pt,useContext:pt,useEffect:pt,useImperativeHandle:pt,useInsertionEffect:pt,useLayoutEffect:pt,useMemo:pt,useReducer:pt,useRef:pt,useState:pt,useDebugValue:pt,useDeferredValue:pt,useTransition:pt,useMutableSource:pt,useSyncExternalStore:pt,useId:pt,unstable_isNewReconciler:!1},Nw={readContext:$t,useCallback:function(e,n){return hn().memoizedState=[e,n===void 0?null:n],e},useContext:$t,useEffect:oh,useImperativeHandle:function(e,n,i){return i=i!=null?i.concat([e]):null,Gi(4194308,4,lh.bind(null,n,e),i)},useLayoutEffect:function(e,n){return Gi(4194308,4,e,n)},useInsertionEffect:function(e,n){return Gi(4,2,e,n)},useMemo:function(e,n){var i=hn();return n=n===void 0?null:n,e=e(),i.memoizedState=[e,n],e},useReducer:function(e,n,i){var l=hn();return n=i!==void 0?i(n):n,l.memoizedState=l.baseState=n,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:n},l.queue=e,e=e.dispatch=Pw.bind(null,Ve,e),[l.memoizedState,e]},useRef:function(e){var n=hn();return e={current:e},n.memoizedState=e},useState:rh,useDebugValue:lu,useDeferredValue:function(e){return hn().memoizedState=e},useTransition:function(){var e=rh(!1),n=e[0];return e=Tw.bind(null,e[1]),hn().memoizedState=e,[n,e]},useMutableSource:function(){},useSyncExternalStore:function(e,n,i){var l=Ve,c=hn();if(Be){if(i===void 0)throw Error(s(407));i=i()}else{if(i=n(),rt===null)throw Error(s(349));(Rr&30)!==0||Yf(l,n,i)}c.memoizedState=i;var f={value:i,getSnapshot:n};return c.queue=f,oh(eh.bind(null,l,f,e),[e]),l.flags|=2048,Ro(9,Zf.bind(null,l,f,i,n),void 0,null),i},useId:function(){var e=hn(),n=rt.identifierPrefix;if(Be){var i=Cn,l=kn;i=(l&~(1<<32-Yt(l)-1)).toString(32)+i,n=":"+n+"R"+i,i=Co++,0<\/script>",e=e.removeChild(e.firstChild)):typeof l.is=="string"?e=y.createElement(i,{is:l.is}):(e=y.createElement(i),i==="select"&&(y=e,l.multiple?y.multiple=!0:l.size&&(y.size=l.size))):e=y.createElementNS(e,i),e[dn]=n,e[vo]=l,jh(e,n,!1,!1),n.stateNode=e;e:{switch(y=el(i,l),i){case"dialog":Ue("cancel",e),Ue("close",e),c=l;break;case"iframe":case"object":case"embed":Ue("load",e),c=l;break;case"video":case"audio":for(c=0;cCs&&(n.flags|=128,l=!0,To(f,!1),n.lanes=4194304)}else{if(!l)if(e=Wi(y),e!==null){if(n.flags|=128,l=!0,i=e.updateQueue,i!==null&&(n.updateQueue=i,n.flags|=4),To(f,!0),f.tail===null&&f.tailMode==="hidden"&&!y.alternate&&!Be)return mt(n),null}else 2*We()-f.renderingStartTime>Cs&&i!==1073741824&&(n.flags|=128,l=!0,To(f,!1),n.lanes=4194304);f.isBackwards?(y.sibling=n.child,n.child=y):(i=f.last,i!==null?i.sibling=y:n.child=y,f.last=y)}return f.tail!==null?(n=f.tail,f.rendering=n,f.tail=n.sibling,f.renderingStartTime=We(),n.sibling=null,i=$e.current,Fe($e,l?i&1|2:i&1),n):(mt(n),null);case 22:case 23:return Au(),l=n.memoizedState!==null,e!==null&&e.memoizedState!==null!==l&&(n.flags|=8192),l&&(n.mode&1)!==0?(Dt&1073741824)!==0&&(mt(n),n.subtreeFlags&6&&(n.flags|=8192)):mt(n),null;case 24:return null;case 25:return null}throw Error(s(156,n.tag))}function Uw(e,n){switch(Bl(n),n.tag){case 1:return kt(n.type)&&Di(),e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 3:return Ss(),ze(_t),ze(ht),eu(),e=n.flags,(e&65536)!==0&&(e&128)===0?(n.flags=e&-65537|128,n):null;case 5:return Yl(n),null;case 13:if(ze($e),e=n.memoizedState,e!==null&&e.dehydrated!==null){if(n.alternate===null)throw Error(s(340));gs()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 19:return ze($e),null;case 4:return Ss(),null;case 10:return Ql(n.type._context),null;case 22:case 23:return Au(),null;case 24:return null;default:return null}}var ta=!1,yt=!1,zw=typeof WeakSet=="function"?WeakSet:Set,te=null;function _s(e,n){var i=e.ref;if(i!==null)if(typeof i=="function")try{i(null)}catch(l){He(e,n,l)}else i.current=null}function xu(e,n,i){try{i()}catch(l){He(e,n,l)}}var Uh=!1;function Bw(e,n){if(Al=Si,e=gf(),kl(e)){if("selectionStart"in e)var i={start:e.selectionStart,end:e.selectionEnd};else e:{i=(i=e.ownerDocument)&&i.defaultView||window;var l=i.getSelection&&i.getSelection();if(l&&l.rangeCount!==0){i=l.anchorNode;var c=l.anchorOffset,f=l.focusNode;l=l.focusOffset;try{i.nodeType,f.nodeType}catch{i=null;break e}var y=0,x=-1,b=-1,M=0,q=0,W=e,H=null;t:for(;;){for(var Z;W!==i||c!==0&&W.nodeType!==3||(x=y+c),W!==f||l!==0&&W.nodeType!==3||(b=y+l),W.nodeType===3&&(y+=W.nodeValue.length),(Z=W.firstChild)!==null;)H=W,W=Z;for(;;){if(W===e)break t;if(H===i&&++M===c&&(x=y),H===f&&++q===l&&(b=y),(Z=W.nextSibling)!==null)break;W=H,H=W.parentNode}W=Z}i=x===-1||b===-1?null:{start:x,end:b}}else i=null}i=i||{start:0,end:0}}else i=null;for(Ll={focusedElem:e,selectionRange:i},Si=!1,te=n;te!==null;)if(n=te,e=n.child,(n.subtreeFlags&1028)!==0&&e!==null)e.return=n,te=e;else for(;te!==null;){n=te;try{var ne=n.alternate;if((n.flags&1024)!==0)switch(n.tag){case 0:case 11:case 15:break;case 1:if(ne!==null){var oe=ne.memoizedProps,Qe=ne.memoizedState,D=n.stateNode,T=D.getSnapshotBeforeUpdate(n.elementType===n.type?oe:tn(n.type,oe),Qe);D.__reactInternalSnapshotBeforeUpdate=T}break;case 3:var j=n.stateNode.containerInfo;j.nodeType===1?j.textContent="":j.nodeType===9&&j.documentElement&&j.removeChild(j.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(s(163))}}catch(Q){He(n,n.return,Q)}if(e=n.sibling,e!==null){e.return=n.return,te=e;break}te=n.return}return ne=Uh,Uh=!1,ne}function Po(e,n,i){var l=n.updateQueue;if(l=l!==null?l.lastEffect:null,l!==null){var c=l=l.next;do{if((c.tag&e)===e){var f=c.destroy;c.destroy=void 0,f!==void 0&&xu(n,i,f)}c=c.next}while(c!==l)}}function na(e,n){if(n=n.updateQueue,n=n!==null?n.lastEffect:null,n!==null){var i=n=n.next;do{if((i.tag&e)===e){var l=i.create;i.destroy=l()}i=i.next}while(i!==n)}}function Su(e){var n=e.ref;if(n!==null){var i=e.stateNode;switch(e.tag){case 5:e=i;break;default:e=i}typeof n=="function"?n(e):n.current=e}}function zh(e){var n=e.alternate;n!==null&&(e.alternate=null,zh(n)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(n=e.stateNode,n!==null&&(delete n[dn],delete n[vo],delete n[Ml],delete n[_w],delete n[kw])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Bh(e){return e.tag===5||e.tag===3||e.tag===4}function $h(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Bh(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Eu(e,n,i){var l=e.tag;if(l===5||l===6)e=e.stateNode,n?i.nodeType===8?i.parentNode.insertBefore(e,n):i.insertBefore(e,n):(i.nodeType===8?(n=i.parentNode,n.insertBefore(e,i)):(n=i,n.appendChild(e)),i=i._reactRootContainer,i!=null||n.onclick!==null||(n.onclick=Li));else if(l!==4&&(e=e.child,e!==null))for(Eu(e,n,i),e=e.sibling;e!==null;)Eu(e,n,i),e=e.sibling}function _u(e,n,i){var l=e.tag;if(l===5||l===6)e=e.stateNode,n?i.insertBefore(e,n):i.appendChild(e);else if(l!==4&&(e=e.child,e!==null))for(_u(e,n,i),e=e.sibling;e!==null;)_u(e,n,i),e=e.sibling}var lt=null,nn=!1;function Gn(e,n,i){for(i=i.child;i!==null;)Vh(e,n,i),i=i.sibling}function Vh(e,n,i){if(cn&&typeof cn.onCommitFiberUnmount=="function")try{cn.onCommitFiberUnmount(mi,i)}catch{}switch(i.tag){case 5:yt||_s(i,n);case 6:var l=lt,c=nn;lt=null,Gn(e,n,i),lt=l,nn=c,lt!==null&&(nn?(e=lt,i=i.stateNode,e.nodeType===8?e.parentNode.removeChild(i):e.removeChild(i)):lt.removeChild(i.stateNode));break;case 18:lt!==null&&(nn?(e=lt,i=i.stateNode,e.nodeType===8?jl(e.parentNode,i):e.nodeType===1&&jl(e,i),io(e)):jl(lt,i.stateNode));break;case 4:l=lt,c=nn,lt=i.stateNode.containerInfo,nn=!0,Gn(e,n,i),lt=l,nn=c;break;case 0:case 11:case 14:case 15:if(!yt&&(l=i.updateQueue,l!==null&&(l=l.lastEffect,l!==null))){c=l=l.next;do{var f=c,y=f.destroy;f=f.tag,y!==void 0&&((f&2)!==0||(f&4)!==0)&&xu(i,n,y),c=c.next}while(c!==l)}Gn(e,n,i);break;case 1:if(!yt&&(_s(i,n),l=i.stateNode,typeof l.componentWillUnmount=="function"))try{l.props=i.memoizedProps,l.state=i.memoizedState,l.componentWillUnmount()}catch(x){He(i,n,x)}Gn(e,n,i);break;case 21:Gn(e,n,i);break;case 22:i.mode&1?(yt=(l=yt)||i.memoizedState!==null,Gn(e,n,i),yt=l):Gn(e,n,i);break;default:Gn(e,n,i)}}function Hh(e){var n=e.updateQueue;if(n!==null){e.updateQueue=null;var i=e.stateNode;i===null&&(i=e.stateNode=new zw),n.forEach(function(l){var c=Jw.bind(null,e,l);i.has(l)||(i.add(l),l.then(c,c))})}}function rn(e,n){var i=n.deletions;if(i!==null)for(var l=0;lc&&(c=y),l&=~f}if(l=c,l=We()-l,l=(120>l?120:480>l?480:1080>l?1080:1920>l?1920:3e3>l?3e3:4320>l?4320:1960*Vw(l/1960))-l,10e?16:e,Xn===null)var l=!1;else{if(e=Xn,Xn=null,aa=0,(Ae&6)!==0)throw Error(s(331));var c=Ae;for(Ae|=4,te=e.current;te!==null;){var f=te,y=f.child;if((te.flags&16)!==0){var x=f.deletions;if(x!==null){for(var b=0;bWe()-bu?Or(e,0):Cu|=i),Rt(e,n)}function rp(e,n){n===0&&((e.mode&1)===0?n=1:(n=gi,gi<<=1,(gi&130023424)===0&&(gi=4194304)));var i=St();e=bn(e,n),e!==null&&(to(e,n,i),Rt(e,i))}function Gw(e){var n=e.memoizedState,i=0;n!==null&&(i=n.retryLane),rp(e,i)}function Jw(e,n){var i=0;switch(e.tag){case 13:var l=e.stateNode,c=e.memoizedState;c!==null&&(i=c.retryLane);break;case 19:l=e.stateNode;break;default:throw Error(s(314))}l!==null&&l.delete(n),rp(e,i)}var sp;sp=function(e,n,i){if(e!==null)if(e.memoizedProps!==n.pendingProps||_t.current)Ct=!0;else{if((e.lanes&i)===0&&(n.flags&128)===0)return Ct=!1,Mw(e,n,i);Ct=(e.flags&131072)!==0}else Ct=!1,Be&&(n.flags&1048576)!==0&&Mf(n,Ui,n.index);switch(n.lanes=0,n.tag){case 2:var l=n.type;ea(e,n),e=n.pendingProps;var c=ps(n,ht.current);xs(n,i),c=ru(null,n,l,e,c,i);var f=su();return n.flags|=1,typeof c=="object"&&c!==null&&typeof c.render=="function"&&c.$$typeof===void 0?(n.tag=1,n.memoizedState=null,n.updateQueue=null,kt(l)?(f=!0,ji(n)):f=!1,n.memoizedState=c.state!==null&&c.state!==void 0?c.state:null,Jl(n),c.updater=Yi,n.stateNode=c,c._reactInternals=n,cu(n,l,e,i),n=pu(null,n,l,!0,f,i)):(n.tag=0,Be&&f&&zl(n),xt(null,n,c,i),n=n.child),n;case 16:l=n.elementType;e:{switch(ea(e,n),e=n.pendingProps,c=l._init,l=c(l._payload),n.type=l,c=n.tag=Yw(l),e=tn(l,e),c){case 0:n=hu(null,n,l,e,i);break e;case 1:n=Oh(null,n,l,e,i);break e;case 11:n=Ch(null,n,l,e,i);break e;case 14:n=bh(null,n,l,tn(l.type,e),i);break e}throw Error(s(306,l,""))}return n;case 0:return l=n.type,c=n.pendingProps,c=n.elementType===l?c:tn(l,c),hu(e,n,l,c,i);case 1:return l=n.type,c=n.pendingProps,c=n.elementType===l?c:tn(l,c),Oh(e,n,l,c,i);case 3:e:{if(Nh(n),e===null)throw Error(s(387));l=n.pendingProps,f=n.memoizedState,c=f.element,Wf(e,n),qi(n,l,null,i);var y=n.memoizedState;if(l=y.element,f.isDehydrated)if(f={element:l,isDehydrated:!1,cache:y.cache,pendingSuspenseBoundaries:y.pendingSuspenseBoundaries,transitions:y.transitions},n.updateQueue.baseState=f,n.memoizedState=f,n.flags&256){c=Es(Error(s(423)),n),n=Ah(e,n,l,i,c);break e}else if(l!==c){c=Es(Error(s(424)),n),n=Ah(e,n,l,i,c);break e}else for(It=Vn(n.stateNode.containerInfo.firstChild),Lt=n,Be=!0,en=null,i=Hf(n,null,l,i),n.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling;else{if(gs(),l===c){n=Tn(e,n,i);break e}xt(e,n,l,i)}n=n.child}return n;case 5:return Gf(n),e===null&&Vl(n),l=n.type,c=n.pendingProps,f=e!==null?e.memoizedProps:null,y=c.children,Il(l,c)?y=null:f!==null&&Il(l,f)&&(n.flags|=32),Ph(e,n),xt(e,n,y,i),n.child;case 6:return e===null&&Vl(n),null;case 13:return Lh(e,n,i);case 4:return Xl(n,n.stateNode.containerInfo),l=n.pendingProps,e===null?n.child=vs(n,null,l,i):xt(e,n,l,i),n.child;case 11:return l=n.type,c=n.pendingProps,c=n.elementType===l?c:tn(l,c),Ch(e,n,l,c,i);case 7:return xt(e,n,n.pendingProps,i),n.child;case 8:return xt(e,n,n.pendingProps.children,i),n.child;case 12:return xt(e,n,n.pendingProps.children,i),n.child;case 10:e:{if(l=n.type._context,c=n.pendingProps,f=n.memoizedProps,y=c.value,Fe($i,l._currentValue),l._currentValue=y,f!==null)if(Zt(f.value,y)){if(f.children===c.children&&!_t.current){n=Tn(e,n,i);break e}}else for(f=n.child,f!==null&&(f.return=n);f!==null;){var x=f.dependencies;if(x!==null){y=f.child;for(var b=x.firstContext;b!==null;){if(b.context===l){if(f.tag===1){b=Rn(-1,i&-i),b.tag=2;var M=f.updateQueue;if(M!==null){M=M.shared;var q=M.pending;q===null?b.next=b:(b.next=q.next,q.next=b),M.pending=b}}f.lanes|=i,b=f.alternate,b!==null&&(b.lanes|=i),Kl(f.return,i,n),x.lanes|=i;break}b=b.next}}else if(f.tag===10)y=f.type===n.type?null:f.child;else if(f.tag===18){if(y=f.return,y===null)throw Error(s(341));y.lanes|=i,x=y.alternate,x!==null&&(x.lanes|=i),Kl(y,i,n),y=f.sibling}else y=f.child;if(y!==null)y.return=f;else for(y=f;y!==null;){if(y===n){y=null;break}if(f=y.sibling,f!==null){f.return=y.return,y=f;break}y=y.return}f=y}xt(e,n,c.children,i),n=n.child}return n;case 9:return c=n.type,l=n.pendingProps.children,xs(n,i),c=$t(c),l=l(c),n.flags|=1,xt(e,n,l,i),n.child;case 14:return l=n.type,c=tn(l,n.pendingProps),c=tn(l.type,c),bh(e,n,l,c,i);case 15:return Rh(e,n,n.type,n.pendingProps,i);case 17:return l=n.type,c=n.pendingProps,c=n.elementType===l?c:tn(l,c),ea(e,n),n.tag=1,kt(l)?(e=!0,ji(n)):e=!1,xs(n,i),vh(n,l,c),cu(n,l,c,i),pu(null,n,l,!0,e,i);case 19:return Dh(e,n,i);case 22:return Th(e,n,i)}throw Error(s(156,n.tag))};function op(e,n){return Md(e,n)}function Xw(e,n,i,l){this.tag=e,this.key=i,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=n,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function qt(e,n,i,l){return new Xw(e,n,i,l)}function Iu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Yw(e){if(typeof e=="function")return Iu(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Te)return 11;if(e===_e)return 14}return 2}function er(e,n){var i=e.alternate;return i===null?(i=qt(e.tag,n,e.key,e.mode),i.elementType=e.elementType,i.type=e.type,i.stateNode=e.stateNode,i.alternate=e,e.alternate=i):(i.pendingProps=n,i.type=e.type,i.flags=0,i.subtreeFlags=0,i.deletions=null),i.flags=e.flags&14680064,i.childLanes=e.childLanes,i.lanes=e.lanes,i.child=e.child,i.memoizedProps=e.memoizedProps,i.memoizedState=e.memoizedState,i.updateQueue=e.updateQueue,n=e.dependencies,i.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},i.sibling=e.sibling,i.index=e.index,i.ref=e.ref,i}function da(e,n,i,l,c,f){var y=2;if(l=e,typeof e=="function")Iu(e)&&(y=1);else if(typeof e=="string")y=5;else e:switch(e){case G:return Ar(i.children,c,f,n);case B:y=8,c|=8;break;case ie:return e=qt(12,i,n,c|2),e.elementType=ie,e.lanes=f,e;case xe:return e=qt(13,i,n,c),e.elementType=xe,e.lanes=f,e;case Y:return e=qt(19,i,n,c),e.elementType=Y,e.lanes=f,e;case ke:return fa(i,c,f,n);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case ue:y=10;break e;case Se:y=9;break e;case Te:y=11;break e;case _e:y=14;break e;case Ee:y=16,l=null;break e}throw Error(s(130,e==null?e:typeof e,""))}return n=qt(y,i,n,c),n.elementType=e,n.type=l,n.lanes=f,n}function Ar(e,n,i,l){return e=qt(7,e,l,n),e.lanes=i,e}function fa(e,n,i,l){return e=qt(22,e,l,n),e.elementType=ke,e.lanes=i,e.stateNode={isHidden:!1},e}function Du(e,n,i){return e=qt(6,e,null,n),e.lanes=i,e}function ju(e,n,i){return n=qt(4,e.children!==null?e.children:[],e.key,n),n.lanes=i,n.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},n}function Zw(e,n,i,l,c){this.tag=n,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=ul(0),this.expirationTimes=ul(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ul(0),this.identifierPrefix=l,this.onRecoverableError=c,this.mutableSourceEagerHydrationData=null}function Mu(e,n,i,l,c,f,y,x,b){return e=new Zw(e,n,i,x,b),n===1?(n=1,f===!0&&(n|=8)):n=0,f=qt(3,null,null,n),e.current=f,f.stateNode=e,f.memoizedState={element:l,isDehydrated:i,cache:null,transitions:null,pendingSuspenseBoundaries:null},Jl(f),e}function e0(e,n,i){var l=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r)}catch(t){console.error(t)}}return r(),Hu.exports=p0(),Hu.exports}var xp;function m0(){if(xp)return xa;xp=1;var r=ey();return xa.createRoot=r.createRoot,xa.hydrateRoot=r.hydrateRoot,xa}var y0=m0();const g0=Vc(y0),v0=20,w0=1e6,In={ADD_TOAST:"ADD_TOAST",UPDATE_TOAST:"UPDATE_TOAST",DISMISS_TOAST:"DISMISS_TOAST",REMOVE_TOAST:"REMOVE_TOAST"};let Qu=0;function x0(){return Qu=(Qu+1)%Number.MAX_VALUE,Qu.toString()}const Ku=new Map,Sp=r=>{if(Ku.has(r))return;const t=setTimeout(()=>{Ku.delete(r),Ho({type:In.REMOVE_TOAST,toastId:r})},w0);Ku.set(r,t)},S0=(r,t)=>{switch(t.type){case In.ADD_TOAST:return{...r,toasts:[t.toast,...r.toasts].slice(0,v0)};case In.UPDATE_TOAST:return{...r,toasts:r.toasts.map(s=>s.id===t.toast.id?{...s,...t.toast}:s)};case In.DISMISS_TOAST:{const{toastId:s}=t;return s?Sp(s):r.toasts.forEach(o=>{Sp(o.id)}),{...r,toasts:r.toasts.map(o=>o.id===s||s===void 0?{...o,open:!1}:o)}}case In.REMOVE_TOAST:return t.toastId===void 0?{...r,toasts:[]}:{...r,toasts:r.toasts.filter(s=>s.id!==t.toastId)}}},Oa=[];let Na={toasts:[]};function Ho(r){Na=S0(Na,r),Oa.forEach(t=>{t(Na)})}function E0({...r}){const t=x0(),s=a=>Ho({type:In.UPDATE_TOAST,toast:{...a,id:t}}),o=()=>Ho({type:In.DISMISS_TOAST,toastId:t});return Ho({type:In.ADD_TOAST,toast:{...r,id:t,open:!0,onOpenChange:a=>{a||o()}}}),{id:t,dismiss:o,update:s}}function _0(){const[r,t]=_.useState(Na);return _.useEffect(()=>(Oa.push(t),()=>{const s=Oa.indexOf(t);s>-1&&Oa.splice(s,1)}),[r]),{...r,toast:E0,dismiss:s=>Ho({type:In.DISMISS_TOAST,toastId:s})}}var qc=ey();const k0=Vc(qc);function jt(r,t,{checkForDefaultPrevented:s=!0}={}){return function(a){if(r==null||r(a),s===!1||!a.defaultPrevented)return t==null?void 0:t(a)}}function Ep(r,t){if(typeof r=="function")return r(t);r!=null&&(r.current=t)}function Wc(...r){return t=>{let s=!1;const o=r.map(a=>{const u=Ep(a,t);return!s&&typeof u=="function"&&(s=!0),u});if(s)return()=>{for(let a=0;a{var S;const{scope:C,children:L,...F}=v,k=((S=C==null?void 0:C[r])==null?void 0:S[p])||h,w=_.useMemo(()=>F,Object.values(F));return E.jsx(k.Provider,{value:w,children:L})};m.displayName=u+"Provider";function g(v,C){var k;const L=((k=C==null?void 0:C[r])==null?void 0:k[p])||h,F=_.useContext(L);if(F)return F;if(d!==void 0)return d;throw new Error(`\`${v}\` must be used within \`${u}\``)}return[m,g]}const a=()=>{const u=s.map(d=>_.createContext(d));return function(h){const p=(h==null?void 0:h[r])||u;return _.useMemo(()=>({[`__scope${r}`]:{...h,[r]:p}}),[h,p])}};return a.scopeName=r,[o,C0(a,...t)]}function C0(...r){const t=r[0];if(r.length===1)return t;const s=()=>{const o=r.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(u){const d=o.reduce((h,{useScope:p,scopeName:m})=>{const v=p(u)[`__scope${m}`];return{...h,...v}},{});return _.useMemo(()=>({[`__scope${t.scopeName}`]:d}),[d])}};return s.scopeName=t.scopeName,s}function _p(r){const t=b0(r),s=_.forwardRef((o,a)=>{const{children:u,...d}=o,h=_.Children.toArray(u),p=h.find(T0);if(p){const m=p.props.children,g=h.map(v=>v===p?_.Children.count(m)>1?_.Children.only(null):_.isValidElement(m)?m.props.children:null:v);return E.jsx(t,{...d,ref:a,children:_.isValidElement(m)?_.cloneElement(m,void 0,g):null})}return E.jsx(t,{...d,ref:a,children:u})});return s.displayName=`${r}.Slot`,s}function b0(r){const t=_.forwardRef((s,o)=>{const{children:a,...u}=s;if(_.isValidElement(a)){const d=O0(a),h=P0(u,a.props);return a.type!==_.Fragment&&(h.ref=o?Wc(o,d):d),_.cloneElement(a,h)}return _.Children.count(a)>1?_.Children.only(null):null});return t.displayName=`${r}.SlotClone`,t}var R0=Symbol("radix.slottable");function T0(r){return _.isValidElement(r)&&typeof r.type=="function"&&"__radixId"in r.type&&r.type.__radixId===R0}function P0(r,t){const s={...t};for(const o in t){const a=r[o],u=t[o];/^on[A-Z]/.test(o)?a&&u?s[o]=(...h)=>{const p=u(...h);return a(...h),p}:a&&(s[o]=a):o==="style"?s[o]={...a,...u}:o==="className"&&(s[o]=[a,u].filter(Boolean).join(" "))}return{...r,...s}}function O0(r){var o,a;let t=(o=Object.getOwnPropertyDescriptor(r.props,"ref"))==null?void 0:o.get,s=t&&"isReactWarning"in t&&t.isReactWarning;return s?r.ref:(t=(a=Object.getOwnPropertyDescriptor(r,"ref"))==null?void 0:a.get,s=t&&"isReactWarning"in t&&t.isReactWarning,s?r.props.ref:r.props.ref||r.ref)}function N0(r){const t=r+"CollectionProvider",[s,o]=ty(t),[a,u]=s(t,{collectionRef:{current:null},itemMap:new Map}),d=k=>{const{scope:w,children:S}=k,I=sr.useRef(null),P=sr.useRef(new Map).current;return E.jsx(a,{scope:w,itemMap:P,collectionRef:I,children:S})};d.displayName=t;const h=r+"CollectionSlot",p=_p(h),m=sr.forwardRef((k,w)=>{const{scope:S,children:I}=k,P=u(h,S),A=Gr(w,P.collectionRef);return E.jsx(p,{ref:A,children:I})});m.displayName=h;const g=r+"CollectionItemSlot",v="data-radix-collection-item",C=_p(g),L=sr.forwardRef((k,w)=>{const{scope:S,children:I,...P}=k,A=sr.useRef(null),V=Gr(w,A),$=u(g,S);return sr.useEffect(()=>($.itemMap.set(A,{ref:A,...P}),()=>void $.itemMap.delete(A))),E.jsx(C,{[v]:"",ref:V,children:I})});L.displayName=g;function F(k){const w=u(r+"CollectionConsumer",k);return sr.useCallback(()=>{const I=w.collectionRef.current;if(!I)return[];const P=Array.from(I.querySelectorAll(`[${v}]`));return Array.from(w.itemMap.values()).sort(($,G)=>P.indexOf($.ref.current)-P.indexOf(G.ref.current))},[w.collectionRef,w.itemMap])}return[{Provider:d,Slot:m,ItemSlot:L},F,o]}function A0(r){const t=L0(r),s=_.forwardRef((o,a)=>{const{children:u,...d}=o,h=_.Children.toArray(u),p=h.find(D0);if(p){const m=p.props.children,g=h.map(v=>v===p?_.Children.count(m)>1?_.Children.only(null):_.isValidElement(m)?m.props.children:null:v);return E.jsx(t,{...d,ref:a,children:_.isValidElement(m)?_.cloneElement(m,void 0,g):null})}return E.jsx(t,{...d,ref:a,children:u})});return s.displayName=`${r}.Slot`,s}function L0(r){const t=_.forwardRef((s,o)=>{const{children:a,...u}=s;if(_.isValidElement(a)){const d=M0(a),h=j0(u,a.props);return a.type!==_.Fragment&&(h.ref=o?Wc(o,d):d),_.cloneElement(a,h)}return _.Children.count(a)>1?_.Children.only(null):null});return t.displayName=`${r}.SlotClone`,t}var I0=Symbol("radix.slottable");function D0(r){return _.isValidElement(r)&&typeof r.type=="function"&&"__radixId"in r.type&&r.type.__radixId===I0}function j0(r,t){const s={...t};for(const o in t){const a=r[o],u=t[o];/^on[A-Z]/.test(o)?a&&u?s[o]=(...h)=>{const p=u(...h);return a(...h),p}:a&&(s[o]=a):o==="style"?s[o]={...a,...u}:o==="className"&&(s[o]=[a,u].filter(Boolean).join(" "))}return{...r,...s}}function M0(r){var o,a;let t=(o=Object.getOwnPropertyDescriptor(r.props,"ref"))==null?void 0:o.get,s=t&&"isReactWarning"in t&&t.isReactWarning;return s?r.ref:(t=(a=Object.getOwnPropertyDescriptor(r,"ref"))==null?void 0:a.get,s=t&&"isReactWarning"in t&&t.isReactWarning,s?r.props.ref:r.props.ref||r.ref)}var F0=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],xn=F0.reduce((r,t)=>{const s=A0(`Primitive.${t}`),o=_.forwardRef((a,u)=>{const{asChild:d,...h}=a,p=d?s:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),E.jsx(p,{...h,ref:u})});return o.displayName=`Primitive.${t}`,{...r,[t]:o}},{});function ny(r,t){r&&qc.flushSync(()=>r.dispatchEvent(t))}function Jr(r){const t=_.useRef(r);return _.useEffect(()=>{t.current=r}),_.useMemo(()=>(...s)=>{var o;return(o=t.current)==null?void 0:o.call(t,...s)},[])}function U0(r,t=globalThis==null?void 0:globalThis.document){const s=Jr(r);_.useEffect(()=>{const o=a=>{a.key==="Escape"&&s(a)};return t.addEventListener("keydown",o,{capture:!0}),()=>t.removeEventListener("keydown",o,{capture:!0})},[s,t])}var z0="DismissableLayer",cc="dismissableLayer.update",B0="dismissableLayer.pointerDownOutside",$0="dismissableLayer.focusOutside",kp,ry=_.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),sy=_.forwardRef((r,t)=>{const{disableOutsidePointerEvents:s=!1,onEscapeKeyDown:o,onPointerDownOutside:a,onFocusOutside:u,onInteractOutside:d,onDismiss:h,...p}=r,m=_.useContext(ry),[g,v]=_.useState(null),C=(g==null?void 0:g.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,L]=_.useState({}),F=Gr(t,G=>v(G)),k=Array.from(m.layers),[w]=[...m.layersWithOutsidePointerEventsDisabled].slice(-1),S=k.indexOf(w),I=g?k.indexOf(g):-1,P=m.layersWithOutsidePointerEventsDisabled.size>0,A=I>=S,V=H0(G=>{const B=G.target,ie=[...m.branches].some(ue=>ue.contains(B));!A||ie||(a==null||a(G),d==null||d(G),G.defaultPrevented||h==null||h())},C),$=q0(G=>{const B=G.target;[...m.branches].some(ue=>ue.contains(B))||(u==null||u(G),d==null||d(G),G.defaultPrevented||h==null||h())},C);return U0(G=>{I===m.layers.size-1&&(o==null||o(G),!G.defaultPrevented&&h&&(G.preventDefault(),h()))},C),_.useEffect(()=>{if(g)return s&&(m.layersWithOutsidePointerEventsDisabled.size===0&&(kp=C.body.style.pointerEvents,C.body.style.pointerEvents="none"),m.layersWithOutsidePointerEventsDisabled.add(g)),m.layers.add(g),Cp(),()=>{s&&m.layersWithOutsidePointerEventsDisabled.size===1&&(C.body.style.pointerEvents=kp)}},[g,C,s,m]),_.useEffect(()=>()=>{g&&(m.layers.delete(g),m.layersWithOutsidePointerEventsDisabled.delete(g),Cp())},[g,m]),_.useEffect(()=>{const G=()=>L({});return document.addEventListener(cc,G),()=>document.removeEventListener(cc,G)},[]),E.jsx(xn.div,{...p,ref:F,style:{pointerEvents:P?A?"auto":"none":void 0,...r.style},onFocusCapture:jt(r.onFocusCapture,$.onFocusCapture),onBlurCapture:jt(r.onBlurCapture,$.onBlurCapture),onPointerDownCapture:jt(r.onPointerDownCapture,V.onPointerDownCapture)})});sy.displayName=z0;var V0="DismissableLayerBranch",oy=_.forwardRef((r,t)=>{const s=_.useContext(ry),o=_.useRef(null),a=Gr(t,o);return _.useEffect(()=>{const u=o.current;if(u)return s.branches.add(u),()=>{s.branches.delete(u)}},[s.branches]),E.jsx(xn.div,{...r,ref:a})});oy.displayName=V0;function H0(r,t=globalThis==null?void 0:globalThis.document){const s=Jr(r),o=_.useRef(!1),a=_.useRef(()=>{});return _.useEffect(()=>{const u=h=>{if(h.target&&!o.current){let p=function(){iy(B0,s,m,{discrete:!0})};const m={originalEvent:h};h.pointerType==="touch"?(t.removeEventListener("click",a.current),a.current=p,t.addEventListener("click",a.current,{once:!0})):p()}else t.removeEventListener("click",a.current);o.current=!1},d=window.setTimeout(()=>{t.addEventListener("pointerdown",u)},0);return()=>{window.clearTimeout(d),t.removeEventListener("pointerdown",u),t.removeEventListener("click",a.current)}},[t,s]),{onPointerDownCapture:()=>o.current=!0}}function q0(r,t=globalThis==null?void 0:globalThis.document){const s=Jr(r),o=_.useRef(!1);return _.useEffect(()=>{const a=u=>{u.target&&!o.current&&iy($0,s,{originalEvent:u},{discrete:!1})};return t.addEventListener("focusin",a),()=>t.removeEventListener("focusin",a)},[t,s]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function Cp(){const r=new CustomEvent(cc);document.dispatchEvent(r)}function iy(r,t,s,{discrete:o}){const a=s.originalEvent.target,u=new CustomEvent(r,{bubbles:!1,cancelable:!0,detail:s});t&&a.addEventListener(r,t,{once:!0}),o?ny(a,u):a.dispatchEvent(u)}var W0=sy,Q0=oy,Wo=globalThis!=null&&globalThis.document?_.useLayoutEffect:()=>{},K0="Portal",ay=_.forwardRef((r,t)=>{var h;const{container:s,...o}=r,[a,u]=_.useState(!1);Wo(()=>u(!0),[]);const d=s||a&&((h=globalThis==null?void 0:globalThis.document)==null?void 0:h.body);return d?k0.createPortal(E.jsx(xn.div,{...o,ref:t}),d):null});ay.displayName=K0;function G0(r,t){return _.useReducer((s,o)=>t[s][o]??s,r)}var ly=r=>{const{present:t,children:s}=r,o=J0(t),a=typeof s=="function"?s({present:o.isPresent}):_.Children.only(s),u=Gr(o.ref,X0(a));return typeof s=="function"||o.isPresent?_.cloneElement(a,{ref:u}):null};ly.displayName="Presence";function J0(r){const[t,s]=_.useState(),o=_.useRef(null),a=_.useRef(r),u=_.useRef("none"),d=r?"mounted":"unmounted",[h,p]=G0(d,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return _.useEffect(()=>{const m=Sa(o.current);u.current=h==="mounted"?m:"none"},[h]),Wo(()=>{const m=o.current,g=a.current;if(g!==r){const C=u.current,L=Sa(m);r?p("MOUNT"):L==="none"||(m==null?void 0:m.display)==="none"?p("UNMOUNT"):p(g&&C!==L?"ANIMATION_OUT":"UNMOUNT"),a.current=r}},[r,p]),Wo(()=>{if(t){let m;const g=t.ownerDocument.defaultView??window,v=L=>{const k=Sa(o.current).includes(CSS.escape(L.animationName));if(L.target===t&&k&&(p("ANIMATION_END"),!a.current)){const w=t.style.animationFillMode;t.style.animationFillMode="forwards",m=g.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=w)})}},C=L=>{L.target===t&&(u.current=Sa(o.current))};return t.addEventListener("animationstart",C),t.addEventListener("animationcancel",v),t.addEventListener("animationend",v),()=>{g.clearTimeout(m),t.removeEventListener("animationstart",C),t.removeEventListener("animationcancel",v),t.removeEventListener("animationend",v)}}else p("ANIMATION_END")},[t,p]),{isPresent:["mounted","unmountSuspended"].includes(h),ref:_.useCallback(m=>{o.current=m?getComputedStyle(m):null,s(m)},[])}}function Sa(r){return(r==null?void 0:r.animationName)||"none"}function X0(r){var o,a;let t=(o=Object.getOwnPropertyDescriptor(r.props,"ref"))==null?void 0:o.get,s=t&&"isReactWarning"in t&&t.isReactWarning;return s?r.ref:(t=(a=Object.getOwnPropertyDescriptor(r,"ref"))==null?void 0:a.get,s=t&&"isReactWarning"in t&&t.isReactWarning,s?r.props.ref:r.props.ref||r.ref)}var Y0=Zm[" useInsertionEffect ".trim().toString()]||Wo;function Z0({prop:r,defaultProp:t,onChange:s=()=>{},caller:o}){const[a,u,d]=ex({defaultProp:t,onChange:s}),h=r!==void 0,p=h?r:a;{const g=_.useRef(r!==void 0);_.useEffect(()=>{const v=g.current;v!==h&&console.warn(`${o} is changing from ${v?"controlled":"uncontrolled"} to ${h?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),g.current=h},[h,o])}const m=_.useCallback(g=>{var v;if(h){const C=tx(g)?g(r):g;C!==r&&((v=d.current)==null||v.call(d,C))}else u(g)},[h,r,u,d]);return[p,m]}function ex({defaultProp:r,onChange:t}){const[s,o]=_.useState(r),a=_.useRef(s),u=_.useRef(t);return Y0(()=>{u.current=t},[t]),_.useEffect(()=>{var d;a.current!==s&&((d=u.current)==null||d.call(u,s),a.current=s)},[s,a]),[s,o,u]}function tx(r){return typeof r=="function"}var nx=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),rx="VisuallyHidden",Qc=_.forwardRef((r,t)=>E.jsx(xn.span,{...r,ref:t,style:{...nx,...r.style}}));Qc.displayName=rx;var Kc="ToastProvider",[Gc,sx,ox]=N0("Toast"),[uy]=ty("Toast",[ox]),[ix,Wa]=uy(Kc),cy=r=>{const{__scopeToast:t,label:s="Notification",duration:o=5e3,swipeDirection:a="right",swipeThreshold:u=50,children:d}=r,[h,p]=_.useState(null),[m,g]=_.useState(0),v=_.useRef(!1),C=_.useRef(!1);return s.trim()||console.error(`Invalid prop \`label\` supplied to \`${Kc}\`. Expected non-empty \`string\`.`),E.jsx(Gc.Provider,{scope:t,children:E.jsx(ix,{scope:t,label:s,duration:o,swipeDirection:a,swipeThreshold:u,toastCount:m,viewport:h,onViewportChange:p,onToastAdd:_.useCallback(()=>g(L=>L+1),[]),onToastRemove:_.useCallback(()=>g(L=>L-1),[]),isFocusedToastEscapeKeyDownRef:v,isClosePausedRef:C,children:d})})};cy.displayName=Kc;var dy="ToastViewport",ax=["F8"],dc="toast.viewportPause",fc="toast.viewportResume",fy=_.forwardRef((r,t)=>{const{__scopeToast:s,hotkey:o=ax,label:a="Notifications ({hotkey})",...u}=r,d=Wa(dy,s),h=sx(s),p=_.useRef(null),m=_.useRef(null),g=_.useRef(null),v=_.useRef(null),C=Gr(t,v,d.onViewportChange),L=o.join("+").replace(/Key/g,"").replace(/Digit/g,""),F=d.toastCount>0;_.useEffect(()=>{const w=S=>{var P;o.length!==0&&o.every(A=>S[A]||S.code===A)&&((P=v.current)==null||P.focus())};return document.addEventListener("keydown",w),()=>document.removeEventListener("keydown",w)},[o]),_.useEffect(()=>{const w=p.current,S=v.current;if(F&&w&&S){const I=()=>{if(!d.isClosePausedRef.current){const $=new CustomEvent(dc);S.dispatchEvent($),d.isClosePausedRef.current=!0}},P=()=>{if(d.isClosePausedRef.current){const $=new CustomEvent(fc);S.dispatchEvent($),d.isClosePausedRef.current=!1}},A=$=>{!w.contains($.relatedTarget)&&P()},V=()=>{w.contains(document.activeElement)||P()};return w.addEventListener("focusin",I),w.addEventListener("focusout",A),w.addEventListener("pointermove",I),w.addEventListener("pointerleave",V),window.addEventListener("blur",I),window.addEventListener("focus",P),()=>{w.removeEventListener("focusin",I),w.removeEventListener("focusout",A),w.removeEventListener("pointermove",I),w.removeEventListener("pointerleave",V),window.removeEventListener("blur",I),window.removeEventListener("focus",P)}}},[F,d.isClosePausedRef]);const k=_.useCallback(({tabbingDirection:w})=>{const I=h().map(P=>{const A=P.ref.current,V=[A,...xx(A)];return w==="forwards"?V:V.reverse()});return(w==="forwards"?I.reverse():I).flat()},[h]);return _.useEffect(()=>{const w=v.current;if(w){const S=I=>{var V,$,G;const P=I.altKey||I.ctrlKey||I.metaKey;if(I.key==="Tab"&&!P){const B=document.activeElement,ie=I.shiftKey;if(I.target===w&&ie){(V=m.current)==null||V.focus();return}const Te=k({tabbingDirection:ie?"backwards":"forwards"}),xe=Te.findIndex(Y=>Y===B);Gu(Te.slice(xe+1))?I.preventDefault():ie?($=m.current)==null||$.focus():(G=g.current)==null||G.focus()}};return w.addEventListener("keydown",S),()=>w.removeEventListener("keydown",S)}},[h,k]),E.jsxs(Q0,{ref:p,role:"region","aria-label":a.replace("{hotkey}",L),tabIndex:-1,style:{pointerEvents:F?void 0:"none"},children:[F&&E.jsx(hc,{ref:m,onFocusFromOutsideViewport:()=>{const w=k({tabbingDirection:"forwards"});Gu(w)}}),E.jsx(Gc.Slot,{scope:s,children:E.jsx(xn.ol,{tabIndex:-1,...u,ref:C})}),F&&E.jsx(hc,{ref:g,onFocusFromOutsideViewport:()=>{const w=k({tabbingDirection:"backwards"});Gu(w)}})]})});fy.displayName=dy;var hy="ToastFocusProxy",hc=_.forwardRef((r,t)=>{const{__scopeToast:s,onFocusFromOutsideViewport:o,...a}=r,u=Wa(hy,s);return E.jsx(Qc,{tabIndex:0,...a,ref:t,style:{position:"fixed"},onFocus:d=>{var m;const h=d.relatedTarget;!((m=u.viewport)!=null&&m.contains(h))&&o()}})});hc.displayName=hy;var ri="Toast",lx="toast.swipeStart",ux="toast.swipeMove",cx="toast.swipeCancel",dx="toast.swipeEnd",py=_.forwardRef((r,t)=>{const{forceMount:s,open:o,defaultOpen:a,onOpenChange:u,...d}=r,[h,p]=Z0({prop:o,defaultProp:a??!0,onChange:u,caller:ri});return E.jsx(ly,{present:s||h,children:E.jsx(px,{open:h,...d,ref:t,onClose:()=>p(!1),onPause:Jr(r.onPause),onResume:Jr(r.onResume),onSwipeStart:jt(r.onSwipeStart,m=>{m.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:jt(r.onSwipeMove,m=>{const{x:g,y:v}=m.detail.delta;m.currentTarget.setAttribute("data-swipe","move"),m.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${g}px`),m.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${v}px`)}),onSwipeCancel:jt(r.onSwipeCancel,m=>{m.currentTarget.setAttribute("data-swipe","cancel"),m.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),m.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),m.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),m.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:jt(r.onSwipeEnd,m=>{const{x:g,y:v}=m.detail.delta;m.currentTarget.setAttribute("data-swipe","end"),m.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),m.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),m.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${g}px`),m.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${v}px`),p(!1)})})})});py.displayName=ri;var[fx,hx]=uy(ri,{onClose(){}}),px=_.forwardRef((r,t)=>{const{__scopeToast:s,type:o="foreground",duration:a,open:u,onClose:d,onEscapeKeyDown:h,onPause:p,onResume:m,onSwipeStart:g,onSwipeMove:v,onSwipeCancel:C,onSwipeEnd:L,...F}=r,k=Wa(ri,s),[w,S]=_.useState(null),I=Gr(t,Y=>S(Y)),P=_.useRef(null),A=_.useRef(null),V=a||k.duration,$=_.useRef(0),G=_.useRef(V),B=_.useRef(0),{onToastAdd:ie,onToastRemove:ue}=k,Se=Jr(()=>{var _e;(w==null?void 0:w.contains(document.activeElement))&&((_e=k.viewport)==null||_e.focus()),d()}),Te=_.useCallback(Y=>{!Y||Y===1/0||(window.clearTimeout(B.current),$.current=new Date().getTime(),B.current=window.setTimeout(Se,Y))},[Se]);_.useEffect(()=>{const Y=k.viewport;if(Y){const _e=()=>{Te(G.current),m==null||m()},Ee=()=>{const ke=new Date().getTime()-$.current;G.current=G.current-ke,window.clearTimeout(B.current),p==null||p()};return Y.addEventListener(dc,Ee),Y.addEventListener(fc,_e),()=>{Y.removeEventListener(dc,Ee),Y.removeEventListener(fc,_e)}}},[k.viewport,V,p,m,Te]),_.useEffect(()=>{u&&!k.isClosePausedRef.current&&Te(V)},[u,V,k.isClosePausedRef,Te]),_.useEffect(()=>(ie(),()=>ue()),[ie,ue]);const xe=_.useMemo(()=>w?Sy(w):null,[w]);return k.viewport?E.jsxs(E.Fragment,{children:[xe&&E.jsx(mx,{__scopeToast:s,role:"status","aria-live":o==="foreground"?"assertive":"polite",children:xe}),E.jsx(fx,{scope:s,onClose:Se,children:qc.createPortal(E.jsx(Gc.ItemSlot,{scope:s,children:E.jsx(W0,{asChild:!0,onEscapeKeyDown:jt(h,()=>{k.isFocusedToastEscapeKeyDownRef.current||Se(),k.isFocusedToastEscapeKeyDownRef.current=!1}),children:E.jsx(xn.li,{tabIndex:0,"data-state":u?"open":"closed","data-swipe-direction":k.swipeDirection,...F,ref:I,style:{userSelect:"none",touchAction:"none",...r.style},onKeyDown:jt(r.onKeyDown,Y=>{Y.key==="Escape"&&(h==null||h(Y.nativeEvent),Y.nativeEvent.defaultPrevented||(k.isFocusedToastEscapeKeyDownRef.current=!0,Se()))}),onPointerDown:jt(r.onPointerDown,Y=>{Y.button===0&&(P.current={x:Y.clientX,y:Y.clientY})}),onPointerMove:jt(r.onPointerMove,Y=>{if(!P.current)return;const _e=Y.clientX-P.current.x,Ee=Y.clientY-P.current.y,ke=!!A.current,K=["left","right"].includes(k.swipeDirection),ae=["left","up"].includes(k.swipeDirection)?Math.min:Math.max,U=K?ae(0,_e):0,O=K?0:ae(0,Ee),z=Y.pointerType==="touch"?10:2,ce={x:U,y:O},me={originalEvent:Y,delta:ce};ke?(A.current=ce,Ea(ux,v,me,{discrete:!1})):bp(ce,k.swipeDirection,z)?(A.current=ce,Ea(lx,g,me,{discrete:!1}),Y.target.setPointerCapture(Y.pointerId)):(Math.abs(_e)>z||Math.abs(Ee)>z)&&(P.current=null)}),onPointerUp:jt(r.onPointerUp,Y=>{const _e=A.current,Ee=Y.target;if(Ee.hasPointerCapture(Y.pointerId)&&Ee.releasePointerCapture(Y.pointerId),A.current=null,P.current=null,_e){const ke=Y.currentTarget,K={originalEvent:Y,delta:_e};bp(_e,k.swipeDirection,k.swipeThreshold)?Ea(dx,L,K,{discrete:!0}):Ea(cx,C,K,{discrete:!0}),ke.addEventListener("click",ae=>ae.preventDefault(),{once:!0})}})})})}),k.viewport)})]}):null}),mx=r=>{const{__scopeToast:t,children:s,...o}=r,a=Wa(ri,t),[u,d]=_.useState(!1),[h,p]=_.useState(!1);return vx(()=>d(!0)),_.useEffect(()=>{const m=window.setTimeout(()=>p(!0),1e3);return()=>window.clearTimeout(m)},[]),h?null:E.jsx(ay,{asChild:!0,children:E.jsx(Qc,{...o,children:u&&E.jsxs(E.Fragment,{children:[a.label," ",s]})})})},yx="ToastTitle",my=_.forwardRef((r,t)=>{const{__scopeToast:s,...o}=r;return E.jsx(xn.div,{...o,ref:t})});my.displayName=yx;var gx="ToastDescription",yy=_.forwardRef((r,t)=>{const{__scopeToast:s,...o}=r;return E.jsx(xn.div,{...o,ref:t})});yy.displayName=gx;var gy="ToastAction",vy=_.forwardRef((r,t)=>{const{altText:s,...o}=r;return s.trim()?E.jsx(xy,{altText:s,asChild:!0,children:E.jsx(Jc,{...o,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${gy}\`. Expected non-empty \`string\`.`),null)});vy.displayName=gy;var wy="ToastClose",Jc=_.forwardRef((r,t)=>{const{__scopeToast:s,...o}=r,a=hx(wy,s);return E.jsx(xy,{asChild:!0,children:E.jsx(xn.button,{type:"button",...o,ref:t,onClick:jt(r.onClick,a.onClose)})})});Jc.displayName=wy;var xy=_.forwardRef((r,t)=>{const{__scopeToast:s,altText:o,...a}=r;return E.jsx(xn.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":o||void 0,...a,ref:t})});function Sy(r){const t=[];return Array.from(r.childNodes).forEach(o=>{if(o.nodeType===o.TEXT_NODE&&o.textContent&&t.push(o.textContent),wx(o)){const a=o.ariaHidden||o.hidden||o.style.display==="none",u=o.dataset.radixToastAnnounceExclude==="";if(!a)if(u){const d=o.dataset.radixToastAnnounceAlt;d&&t.push(d)}else t.push(...Sy(o))}}),t}function Ea(r,t,s,{discrete:o}){const a=s.originalEvent.currentTarget,u=new CustomEvent(r,{bubbles:!0,cancelable:!0,detail:s});t&&a.addEventListener(r,t,{once:!0}),o?ny(a,u):a.dispatchEvent(u)}var bp=(r,t,s=0)=>{const o=Math.abs(r.x),a=Math.abs(r.y),u=o>a;return t==="left"||t==="right"?u&&o>s:!u&&a>s};function vx(r=()=>{}){const t=Jr(r);Wo(()=>{let s=0,o=0;return s=window.requestAnimationFrame(()=>o=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(s),window.cancelAnimationFrame(o)}},[t])}function wx(r){return r.nodeType===r.ELEMENT_NODE}function xx(r){const t=[],s=document.createTreeWalker(r,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const a=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||a?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;s.nextNode();)t.push(s.currentNode);return t}function Gu(r){const t=document.activeElement;return r.some(s=>s===t?!0:(s.focus(),document.activeElement!==t))}var Sx=cy,Ey=fy,_y=py,ky=my,Cy=yy,by=vy,Ry=Jc;function Ty(r){var t,s,o="";if(typeof r=="string"||typeof r=="number")o+=r;else if(typeof r=="object")if(Array.isArray(r)){var a=r.length;for(t=0;ttypeof r=="boolean"?`${r}`:r===0?"0":r,Tp=Py,Ex=(r,t)=>s=>{var o;if((t==null?void 0:t.variants)==null)return Tp(r,s==null?void 0:s.class,s==null?void 0:s.className);const{variants:a,defaultVariants:u}=t,d=Object.keys(a).map(m=>{const g=s==null?void 0:s[m],v=u==null?void 0:u[m];if(g===null)return null;const C=Rp(g)||Rp(v);return a[m][C]}),h=s&&Object.entries(s).reduce((m,g)=>{let[v,C]=g;return C===void 0||(m[v]=C),m},{}),p=t==null||(o=t.compoundVariants)===null||o===void 0?void 0:o.reduce((m,g)=>{let{class:v,className:C,...L}=g;return Object.entries(L).every(F=>{let[k,w]=F;return Array.isArray(w)?w.includes({...u,...h}[k]):{...u,...h}[k]===w})?[...m,v,C]:m},[]);return Tp(r,d,p,s==null?void 0:s.class,s==null?void 0:s.className)};/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const _x=r=>r.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Oy=(...r)=>r.filter((t,s,o)=>!!t&&t.trim()!==""&&o.indexOf(t)===s).join(" ").trim();/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */var kx={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Cx=_.forwardRef(({color:r="currentColor",size:t=24,strokeWidth:s=2,absoluteStrokeWidth:o,className:a="",children:u,iconNode:d,...h},p)=>_.createElement("svg",{ref:p,...kx,width:t,height:t,stroke:r,strokeWidth:o?Number(s)*24/Number(t):s,className:Oy("lucide",a),...h},[...d.map(([m,g])=>_.createElement(m,g)),...Array.isArray(u)?u:[u]]));/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const vr=(r,t)=>{const s=_.forwardRef(({className:o,...a},u)=>_.createElement(Cx,{ref:u,iconNode:t,className:Oy(`lucide-${_x(r)}`,o),...a}));return s.displayName=`${r}`,s};/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const bx=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Ju=vr("ChevronRight",bx);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Rx=[["path",{d:"M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z",key:"1jg4f8"}]],Tx=vr("Facebook",Rx);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Px=[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]],Ox=vr("Link",Px);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Nx=[["path",{d:"M16 8a6 6 0 0 1 6 6v7h-4v-7a2 2 0 0 0-2-2 2 2 0 0 0-2 2v7h-4v-7a6 6 0 0 1 6-6z",key:"c2jq9f"}],["rect",{width:"4",height:"12",x:"2",y:"9",key:"mk3on5"}],["circle",{cx:"4",cy:"4",r:"2",key:"bt5ra8"}]],Ax=vr("Linkedin",Nx);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Lx=[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]],Ix=vr("Mail",Lx);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Dx=[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]],jx=vr("Menu",Dx);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Mx=[["path",{d:"M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2",key:"143wyd"}],["path",{d:"M6 9V3a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v6",key:"1itne7"}],["rect",{x:"6",y:"14",width:"12",height:"8",rx:"1",key:"1ue0tg"}]],Fx=vr("Printer",Mx);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Ux=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Ny=vr("X",Ux),zx=(r,t)=>{const s=new Array(r.length+t.length);for(let o=0;o({classGroupId:r,validator:t}),Ay=(r=new Map,t=null,s)=>({nextPart:r,validators:t,classGroupId:s}),za="-",Pp=[],$x="arbitrary..",Vx=r=>{const t=qx(r),{conflictingClassGroups:s,conflictingClassGroupModifiers:o}=r;return{getClassGroupId:d=>{if(d.startsWith("[")&&d.endsWith("]"))return Hx(d);const h=d.split(za),p=h[0]===""&&h.length>1?1:0;return Ly(h,p,t)},getConflictingClassGroupIds:(d,h)=>{if(h){const p=o[d],m=s[d];return p?m?zx(m,p):p:m||Pp}return s[d]||Pp}}},Ly=(r,t,s)=>{if(r.length-t===0)return s.classGroupId;const a=r[t],u=s.nextPart.get(a);if(u){const m=Ly(r,t+1,u);if(m)return m}const d=s.validators;if(d===null)return;const h=t===0?r.join(za):r.slice(t).join(za),p=d.length;for(let m=0;mr.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=r.slice(1,-1),s=t.indexOf(":"),o=t.slice(0,s);return o?$x+o:void 0})(),qx=r=>{const{theme:t,classGroups:s}=r;return Wx(s,t)},Wx=(r,t)=>{const s=Ay();for(const o in r){const a=r[o];Xc(a,s,o,t)}return s},Xc=(r,t,s,o)=>{const a=r.length;for(let u=0;u{if(typeof r=="string"){Kx(r,t,s);return}if(typeof r=="function"){Gx(r,t,s,o);return}Jx(r,t,s,o)},Kx=(r,t,s)=>{const o=r===""?t:Iy(t,r);o.classGroupId=s},Gx=(r,t,s,o)=>{if(Xx(r)){Xc(r(o),t,s,o);return}t.validators===null&&(t.validators=[]),t.validators.push(Bx(s,r))},Jx=(r,t,s,o)=>{const a=Object.entries(r),u=a.length;for(let d=0;d{let s=r;const o=t.split(za),a=o.length;for(let u=0;u"isThemeGetter"in r&&r.isThemeGetter===!0,Yx=r=>{if(r<1)return{get:()=>{},set:()=>{}};let t=0,s=Object.create(null),o=Object.create(null);const a=(u,d)=>{s[u]=d,t++,t>r&&(t=0,o=s,s=Object.create(null))};return{get(u){let d=s[u];if(d!==void 0)return d;if((d=o[u])!==void 0)return a(u,d),d},set(u,d){u in s?s[u]=d:a(u,d)}}},pc="!",Op=":",Zx=[],Np=(r,t,s,o,a)=>({modifiers:r,hasImportantModifier:t,baseClassName:s,maybePostfixModifierPosition:o,isExternal:a}),eS=r=>{const{prefix:t,experimentalParseClassName:s}=r;let o=a=>{const u=[];let d=0,h=0,p=0,m;const g=a.length;for(let k=0;kp?m-p:void 0;return Np(u,L,C,F)};if(t){const a=t+Op,u=o;o=d=>d.startsWith(a)?u(d.slice(a.length)):Np(Zx,!1,d,void 0,!0)}if(s){const a=o;o=u=>s({className:u,parseClassName:a})}return o},tS=r=>{const t=new Map;return r.orderSensitiveModifiers.forEach((s,o)=>{t.set(s,1e6+o)}),s=>{const o=[];let a=[];for(let u=0;u0&&(a.sort(),o.push(...a),a=[]),o.push(d)):a.push(d)}return a.length>0&&(a.sort(),o.push(...a)),o}},nS=r=>({cache:Yx(r.cacheSize),parseClassName:eS(r),sortModifiers:tS(r),...Vx(r)}),rS=/\s+/,sS=(r,t)=>{const{parseClassName:s,getClassGroupId:o,getConflictingClassGroupIds:a,sortModifiers:u}=t,d=[],h=r.trim().split(rS);let p="";for(let m=h.length-1;m>=0;m-=1){const g=h[m],{isExternal:v,modifiers:C,hasImportantModifier:L,baseClassName:F,maybePostfixModifierPosition:k}=s(g);if(v){p=g+(p.length>0?" "+p:p);continue}let w=!!k,S=o(w?F.substring(0,k):F);if(!S){if(!w){p=g+(p.length>0?" "+p:p);continue}if(S=o(F),!S){p=g+(p.length>0?" "+p:p);continue}w=!1}const I=C.length===0?"":C.length===1?C[0]:u(C).join(":"),P=L?I+pc:I,A=P+S;if(d.indexOf(A)>-1)continue;d.push(A);const V=a(S,w);for(let $=0;$0?" "+p:p)}return p},oS=(...r)=>{let t=0,s,o,a="";for(;t{if(typeof r=="string")return r;let t,s="";for(let o=0;o{let s,o,a,u;const d=p=>{const m=t.reduce((g,v)=>v(g),r());return s=nS(m),o=s.cache.get,a=s.cache.set,u=h,h(p)},h=p=>{const m=o(p);if(m)return m;const g=sS(p,s);return a(p,g),g};return u=d,(...p)=>u(oS(...p))},aS=[],et=r=>{const t=s=>s[r]||aS;return t.isThemeGetter=!0,t},jy=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,My=/^\((?:(\w[\w-]*):)?(.+)\)$/i,lS=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,uS=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,cS=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,dS=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,fS=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,hS=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,nr=r=>lS.test(r),Ce=r=>!!r&&!Number.isNaN(Number(r)),rr=r=>!!r&&Number.isInteger(Number(r)),Xu=r=>r.endsWith("%")&&Ce(r.slice(0,-1)),On=r=>uS.test(r),Fy=()=>!0,pS=r=>cS.test(r)&&!dS.test(r),Yc=()=>!1,mS=r=>fS.test(r),yS=r=>hS.test(r),gS=r=>!re(r)&&!se(r),vS=r=>wr(r,By,Yc),re=r=>jy.test(r),Lr=r=>wr(r,$y,pS),Ap=r=>wr(r,bS,Ce),wS=r=>wr(r,Hy,Fy),xS=r=>wr(r,Vy,Yc),Lp=r=>wr(r,Uy,Yc),SS=r=>wr(r,zy,yS),_a=r=>wr(r,qy,mS),se=r=>My.test(r),Do=r=>es(r,$y),ES=r=>es(r,Vy),Ip=r=>es(r,Uy),_S=r=>es(r,By),kS=r=>es(r,zy),ka=r=>es(r,qy,!0),CS=r=>es(r,Hy,!0),wr=(r,t,s)=>{const o=jy.exec(r);return o?o[1]?t(o[1]):s(o[2]):!1},es=(r,t,s=!1)=>{const o=My.exec(r);return o?o[1]?t(o[1]):s:!1},Uy=r=>r==="position"||r==="percentage",zy=r=>r==="image"||r==="url",By=r=>r==="length"||r==="size"||r==="bg-size",$y=r=>r==="length",bS=r=>r==="number",Vy=r=>r==="family-name",Hy=r=>r==="number"||r==="weight",qy=r=>r==="shadow",RS=()=>{const r=et("color"),t=et("font"),s=et("text"),o=et("font-weight"),a=et("tracking"),u=et("leading"),d=et("breakpoint"),h=et("container"),p=et("spacing"),m=et("radius"),g=et("shadow"),v=et("inset-shadow"),C=et("text-shadow"),L=et("drop-shadow"),F=et("blur"),k=et("perspective"),w=et("aspect"),S=et("ease"),I=et("animate"),P=()=>["auto","avoid","all","avoid-page","page","left","right","column"],A=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],V=()=>[...A(),se,re],$=()=>["auto","hidden","clip","visible","scroll"],G=()=>["auto","contain","none"],B=()=>[se,re,p],ie=()=>[nr,"full","auto",...B()],ue=()=>[rr,"none","subgrid",se,re],Se=()=>["auto",{span:["full",rr,se,re]},rr,se,re],Te=()=>[rr,"auto",se,re],xe=()=>["auto","min","max","fr",se,re],Y=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],_e=()=>["start","end","center","stretch","center-safe","end-safe"],Ee=()=>["auto",...B()],ke=()=>[nr,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...B()],K=()=>[nr,"screen","full","dvw","lvw","svw","min","max","fit",...B()],ae=()=>[nr,"screen","full","lh","dvh","lvh","svh","min","max","fit",...B()],U=()=>[r,se,re],O=()=>[...A(),Ip,Lp,{position:[se,re]}],z=()=>["no-repeat",{repeat:["","x","y","space","round"]}],ce=()=>["auto","cover","contain",_S,vS,{size:[se,re]}],me=()=>[Xu,Do,Lr],he=()=>["","none","full",m,se,re],J=()=>["",Ce,Do,Lr],ve=()=>["solid","dashed","dotted","double"],Re=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ge=()=>[Ce,Xu,Ip,Lp],tt=()=>["","none",F,se,re],Mt=()=>["none",Ce,se,re],it=()=>["none",Ce,se,re],Gt=()=>[Ce,se,re],Ft=()=>[nr,"full",...B()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[On],breakpoint:[On],color:[Fy],container:[On],"drop-shadow":[On],ease:["in","out","in-out"],font:[gS],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[On],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[On],shadow:[On],spacing:["px",Ce],text:[On],"text-shadow":[On],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",nr,re,se,w]}],container:["container"],columns:[{columns:[Ce,re,se,h]}],"break-after":[{"break-after":P()}],"break-before":[{"break-before":P()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:V()}],overflow:[{overflow:$()}],"overflow-x":[{"overflow-x":$()}],"overflow-y":[{"overflow-y":$()}],overscroll:[{overscroll:G()}],"overscroll-x":[{"overscroll-x":G()}],"overscroll-y":[{"overscroll-y":G()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:ie()}],"inset-x":[{"inset-x":ie()}],"inset-y":[{"inset-y":ie()}],start:[{"inset-s":ie(),start:ie()}],end:[{"inset-e":ie(),end:ie()}],"inset-bs":[{"inset-bs":ie()}],"inset-be":[{"inset-be":ie()}],top:[{top:ie()}],right:[{right:ie()}],bottom:[{bottom:ie()}],left:[{left:ie()}],visibility:["visible","invisible","collapse"],z:[{z:[rr,"auto",se,re]}],basis:[{basis:[nr,"full","auto",h,...B()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Ce,nr,"auto","initial","none",re]}],grow:[{grow:["",Ce,se,re]}],shrink:[{shrink:["",Ce,se,re]}],order:[{order:[rr,"first","last","none",se,re]}],"grid-cols":[{"grid-cols":ue()}],"col-start-end":[{col:Se()}],"col-start":[{"col-start":Te()}],"col-end":[{"col-end":Te()}],"grid-rows":[{"grid-rows":ue()}],"row-start-end":[{row:Se()}],"row-start":[{"row-start":Te()}],"row-end":[{"row-end":Te()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":xe()}],"auto-rows":[{"auto-rows":xe()}],gap:[{gap:B()}],"gap-x":[{"gap-x":B()}],"gap-y":[{"gap-y":B()}],"justify-content":[{justify:[...Y(),"normal"]}],"justify-items":[{"justify-items":[..._e(),"normal"]}],"justify-self":[{"justify-self":["auto",..._e()]}],"align-content":[{content:["normal",...Y()]}],"align-items":[{items:[..._e(),{baseline:["","last"]}]}],"align-self":[{self:["auto",..._e(),{baseline:["","last"]}]}],"place-content":[{"place-content":Y()}],"place-items":[{"place-items":[..._e(),"baseline"]}],"place-self":[{"place-self":["auto",..._e()]}],p:[{p:B()}],px:[{px:B()}],py:[{py:B()}],ps:[{ps:B()}],pe:[{pe:B()}],pbs:[{pbs:B()}],pbe:[{pbe:B()}],pt:[{pt:B()}],pr:[{pr:B()}],pb:[{pb:B()}],pl:[{pl:B()}],m:[{m:Ee()}],mx:[{mx:Ee()}],my:[{my:Ee()}],ms:[{ms:Ee()}],me:[{me:Ee()}],mbs:[{mbs:Ee()}],mbe:[{mbe:Ee()}],mt:[{mt:Ee()}],mr:[{mr:Ee()}],mb:[{mb:Ee()}],ml:[{ml:Ee()}],"space-x":[{"space-x":B()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":B()}],"space-y-reverse":["space-y-reverse"],size:[{size:ke()}],"inline-size":[{inline:["auto",...K()]}],"min-inline-size":[{"min-inline":["auto",...K()]}],"max-inline-size":[{"max-inline":["none",...K()]}],"block-size":[{block:["auto",...ae()]}],"min-block-size":[{"min-block":["auto",...ae()]}],"max-block-size":[{"max-block":["none",...ae()]}],w:[{w:[h,"screen",...ke()]}],"min-w":[{"min-w":[h,"screen","none",...ke()]}],"max-w":[{"max-w":[h,"screen","none","prose",{screen:[d]},...ke()]}],h:[{h:["screen","lh",...ke()]}],"min-h":[{"min-h":["screen","lh","none",...ke()]}],"max-h":[{"max-h":["screen","lh",...ke()]}],"font-size":[{text:["base",s,Do,Lr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[o,CS,wS]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Xu,re]}],"font-family":[{font:[ES,xS,t]}],"font-features":[{"font-features":[re]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[a,se,re]}],"line-clamp":[{"line-clamp":[Ce,"none",se,Ap]}],leading:[{leading:[u,...B()]}],"list-image":[{"list-image":["none",se,re]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",se,re]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:U()}],"text-color":[{text:U()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ve(),"wavy"]}],"text-decoration-thickness":[{decoration:[Ce,"from-font","auto",se,Lr]}],"text-decoration-color":[{decoration:U()}],"underline-offset":[{"underline-offset":[Ce,"auto",se,re]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:B()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",se,re]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",se,re]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:O()}],"bg-repeat":[{bg:z()}],"bg-size":[{bg:ce()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},rr,se,re],radial:["",se,re],conic:[rr,se,re]},kS,SS]}],"bg-color":[{bg:U()}],"gradient-from-pos":[{from:me()}],"gradient-via-pos":[{via:me()}],"gradient-to-pos":[{to:me()}],"gradient-from":[{from:U()}],"gradient-via":[{via:U()}],"gradient-to":[{to:U()}],rounded:[{rounded:he()}],"rounded-s":[{"rounded-s":he()}],"rounded-e":[{"rounded-e":he()}],"rounded-t":[{"rounded-t":he()}],"rounded-r":[{"rounded-r":he()}],"rounded-b":[{"rounded-b":he()}],"rounded-l":[{"rounded-l":he()}],"rounded-ss":[{"rounded-ss":he()}],"rounded-se":[{"rounded-se":he()}],"rounded-ee":[{"rounded-ee":he()}],"rounded-es":[{"rounded-es":he()}],"rounded-tl":[{"rounded-tl":he()}],"rounded-tr":[{"rounded-tr":he()}],"rounded-br":[{"rounded-br":he()}],"rounded-bl":[{"rounded-bl":he()}],"border-w":[{border:J()}],"border-w-x":[{"border-x":J()}],"border-w-y":[{"border-y":J()}],"border-w-s":[{"border-s":J()}],"border-w-e":[{"border-e":J()}],"border-w-bs":[{"border-bs":J()}],"border-w-be":[{"border-be":J()}],"border-w-t":[{"border-t":J()}],"border-w-r":[{"border-r":J()}],"border-w-b":[{"border-b":J()}],"border-w-l":[{"border-l":J()}],"divide-x":[{"divide-x":J()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":J()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ve(),"hidden","none"]}],"divide-style":[{divide:[...ve(),"hidden","none"]}],"border-color":[{border:U()}],"border-color-x":[{"border-x":U()}],"border-color-y":[{"border-y":U()}],"border-color-s":[{"border-s":U()}],"border-color-e":[{"border-e":U()}],"border-color-bs":[{"border-bs":U()}],"border-color-be":[{"border-be":U()}],"border-color-t":[{"border-t":U()}],"border-color-r":[{"border-r":U()}],"border-color-b":[{"border-b":U()}],"border-color-l":[{"border-l":U()}],"divide-color":[{divide:U()}],"outline-style":[{outline:[...ve(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Ce,se,re]}],"outline-w":[{outline:["",Ce,Do,Lr]}],"outline-color":[{outline:U()}],shadow:[{shadow:["","none",g,ka,_a]}],"shadow-color":[{shadow:U()}],"inset-shadow":[{"inset-shadow":["none",v,ka,_a]}],"inset-shadow-color":[{"inset-shadow":U()}],"ring-w":[{ring:J()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:U()}],"ring-offset-w":[{"ring-offset":[Ce,Lr]}],"ring-offset-color":[{"ring-offset":U()}],"inset-ring-w":[{"inset-ring":J()}],"inset-ring-color":[{"inset-ring":U()}],"text-shadow":[{"text-shadow":["none",C,ka,_a]}],"text-shadow-color":[{"text-shadow":U()}],opacity:[{opacity:[Ce,se,re]}],"mix-blend":[{"mix-blend":[...Re(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Re()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Ce]}],"mask-image-linear-from-pos":[{"mask-linear-from":ge()}],"mask-image-linear-to-pos":[{"mask-linear-to":ge()}],"mask-image-linear-from-color":[{"mask-linear-from":U()}],"mask-image-linear-to-color":[{"mask-linear-to":U()}],"mask-image-t-from-pos":[{"mask-t-from":ge()}],"mask-image-t-to-pos":[{"mask-t-to":ge()}],"mask-image-t-from-color":[{"mask-t-from":U()}],"mask-image-t-to-color":[{"mask-t-to":U()}],"mask-image-r-from-pos":[{"mask-r-from":ge()}],"mask-image-r-to-pos":[{"mask-r-to":ge()}],"mask-image-r-from-color":[{"mask-r-from":U()}],"mask-image-r-to-color":[{"mask-r-to":U()}],"mask-image-b-from-pos":[{"mask-b-from":ge()}],"mask-image-b-to-pos":[{"mask-b-to":ge()}],"mask-image-b-from-color":[{"mask-b-from":U()}],"mask-image-b-to-color":[{"mask-b-to":U()}],"mask-image-l-from-pos":[{"mask-l-from":ge()}],"mask-image-l-to-pos":[{"mask-l-to":ge()}],"mask-image-l-from-color":[{"mask-l-from":U()}],"mask-image-l-to-color":[{"mask-l-to":U()}],"mask-image-x-from-pos":[{"mask-x-from":ge()}],"mask-image-x-to-pos":[{"mask-x-to":ge()}],"mask-image-x-from-color":[{"mask-x-from":U()}],"mask-image-x-to-color":[{"mask-x-to":U()}],"mask-image-y-from-pos":[{"mask-y-from":ge()}],"mask-image-y-to-pos":[{"mask-y-to":ge()}],"mask-image-y-from-color":[{"mask-y-from":U()}],"mask-image-y-to-color":[{"mask-y-to":U()}],"mask-image-radial":[{"mask-radial":[se,re]}],"mask-image-radial-from-pos":[{"mask-radial-from":ge()}],"mask-image-radial-to-pos":[{"mask-radial-to":ge()}],"mask-image-radial-from-color":[{"mask-radial-from":U()}],"mask-image-radial-to-color":[{"mask-radial-to":U()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":A()}],"mask-image-conic-pos":[{"mask-conic":[Ce]}],"mask-image-conic-from-pos":[{"mask-conic-from":ge()}],"mask-image-conic-to-pos":[{"mask-conic-to":ge()}],"mask-image-conic-from-color":[{"mask-conic-from":U()}],"mask-image-conic-to-color":[{"mask-conic-to":U()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:O()}],"mask-repeat":[{mask:z()}],"mask-size":[{mask:ce()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",se,re]}],filter:[{filter:["","none",se,re]}],blur:[{blur:tt()}],brightness:[{brightness:[Ce,se,re]}],contrast:[{contrast:[Ce,se,re]}],"drop-shadow":[{"drop-shadow":["","none",L,ka,_a]}],"drop-shadow-color":[{"drop-shadow":U()}],grayscale:[{grayscale:["",Ce,se,re]}],"hue-rotate":[{"hue-rotate":[Ce,se,re]}],invert:[{invert:["",Ce,se,re]}],saturate:[{saturate:[Ce,se,re]}],sepia:[{sepia:["",Ce,se,re]}],"backdrop-filter":[{"backdrop-filter":["","none",se,re]}],"backdrop-blur":[{"backdrop-blur":tt()}],"backdrop-brightness":[{"backdrop-brightness":[Ce,se,re]}],"backdrop-contrast":[{"backdrop-contrast":[Ce,se,re]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Ce,se,re]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Ce,se,re]}],"backdrop-invert":[{"backdrop-invert":["",Ce,se,re]}],"backdrop-opacity":[{"backdrop-opacity":[Ce,se,re]}],"backdrop-saturate":[{"backdrop-saturate":[Ce,se,re]}],"backdrop-sepia":[{"backdrop-sepia":["",Ce,se,re]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":B()}],"border-spacing-x":[{"border-spacing-x":B()}],"border-spacing-y":[{"border-spacing-y":B()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",se,re]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Ce,"initial",se,re]}],ease:[{ease:["linear","initial",S,se,re]}],delay:[{delay:[Ce,se,re]}],animate:[{animate:["none",I,se,re]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[k,se,re]}],"perspective-origin":[{"perspective-origin":V()}],rotate:[{rotate:Mt()}],"rotate-x":[{"rotate-x":Mt()}],"rotate-y":[{"rotate-y":Mt()}],"rotate-z":[{"rotate-z":Mt()}],scale:[{scale:it()}],"scale-x":[{"scale-x":it()}],"scale-y":[{"scale-y":it()}],"scale-z":[{"scale-z":it()}],"scale-3d":["scale-3d"],skew:[{skew:Gt()}],"skew-x":[{"skew-x":Gt()}],"skew-y":[{"skew-y":Gt()}],transform:[{transform:[se,re,"","none","gpu","cpu"]}],"transform-origin":[{origin:V()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Ft()}],"translate-x":[{"translate-x":Ft()}],"translate-y":[{"translate-y":Ft()}],"translate-z":[{"translate-z":Ft()}],"translate-none":["translate-none"],accent:[{accent:U()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:U()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",se,re]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":B()}],"scroll-mx":[{"scroll-mx":B()}],"scroll-my":[{"scroll-my":B()}],"scroll-ms":[{"scroll-ms":B()}],"scroll-me":[{"scroll-me":B()}],"scroll-mbs":[{"scroll-mbs":B()}],"scroll-mbe":[{"scroll-mbe":B()}],"scroll-mt":[{"scroll-mt":B()}],"scroll-mr":[{"scroll-mr":B()}],"scroll-mb":[{"scroll-mb":B()}],"scroll-ml":[{"scroll-ml":B()}],"scroll-p":[{"scroll-p":B()}],"scroll-px":[{"scroll-px":B()}],"scroll-py":[{"scroll-py":B()}],"scroll-ps":[{"scroll-ps":B()}],"scroll-pe":[{"scroll-pe":B()}],"scroll-pbs":[{"scroll-pbs":B()}],"scroll-pbe":[{"scroll-pbe":B()}],"scroll-pt":[{"scroll-pt":B()}],"scroll-pr":[{"scroll-pr":B()}],"scroll-pb":[{"scroll-pb":B()}],"scroll-pl":[{"scroll-pl":B()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",se,re]}],fill:[{fill:["none",...U()]}],"stroke-w":[{stroke:[Ce,Do,Lr,Ap]}],stroke:[{stroke:["none",...U()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},TS=iS(RS);function Vs(...r){return TS(Py(r))}const PS=Sx,Wy=_.forwardRef(({className:r,...t},s)=>E.jsx(Ey,{ref:s,className:Vs("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",r),...t}));Wy.displayName=Ey.displayName;const OS=Ex("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),Qy=_.forwardRef(({className:r,variant:t,...s},o)=>E.jsx(_y,{ref:o,className:Vs(OS({variant:t}),r),...s}));Qy.displayName=_y.displayName;const NS=_.forwardRef(({className:r,...t},s)=>E.jsx(by,{ref:s,className:Vs("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",r),...t}));NS.displayName=by.displayName;const Ky=_.forwardRef(({className:r,...t},s)=>E.jsx(Ry,{ref:s,className:Vs("absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",r),"toast-close":"",...t,children:E.jsx(Ny,{className:"h-4 w-4"})}));Ky.displayName=Ry.displayName;const Gy=_.forwardRef(({className:r,...t},s)=>E.jsx(ky,{ref:s,className:Vs("text-sm font-semibold",r),...t}));Gy.displayName=ky.displayName;const Jy=_.forwardRef(({className:r,...t},s)=>E.jsx(Cy,{ref:s,className:Vs("text-sm opacity-90",r),...t}));Jy.displayName=Cy.displayName;function AS(){const{toasts:r}=_0();return E.jsxs(PS,{children:[r.map(function({id:t,title:s,description:o,action:a,...u}){return E.jsxs(Qy,{...u,children:[E.jsxs("div",{className:"grid gap-1",children:[s&&E.jsx(Gy,{children:s}),o&&E.jsx(Jy,{children:o})]}),a,E.jsx(Ky,{})]},t)}),E.jsx(Wy,{})]})}var si=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(r){return this.listeners.add(r),this.onSubscribe(),()=>{this.listeners.delete(r),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},LS={setTimeout:(r,t)=>setTimeout(r,t),clearTimeout:r=>clearTimeout(r),setInterval:(r,t)=>setInterval(r,t),clearInterval:r=>clearInterval(r)},ir,$c,$m,IS=($m=class{constructor(){pe(this,ir,LS);pe(this,$c,!1)}setTimeoutProvider(r){ee(this,ir,r)}setTimeout(r,t){return R(this,ir).setTimeout(r,t)}clearTimeout(r){R(this,ir).clearTimeout(r)}setInterval(r,t){return R(this,ir).setInterval(r,t)}clearInterval(r){R(this,ir).clearInterval(r)}},ir=new WeakMap,$c=new WeakMap,$m),jr=new IS;function DS(r){setTimeout(r,0)}var Xr=typeof window>"u"||"Deno"in globalThis;function Ot(){}function jS(r,t){return typeof r=="function"?r(t):r}function mc(r){return typeof r=="number"&&r>=0&&r!==1/0}function Xy(r,t){return Math.max(r+(t||0)-Date.now(),0)}function mr(r,t){return typeof r=="function"?r(t):r}function Qt(r,t){return typeof r=="function"?r(t):r}function Dp(r,t){const{type:s="all",exact:o,fetchStatus:a,predicate:u,queryKey:d,stale:h}=r;if(d){if(o){if(t.queryHash!==Zc(d,t.options))return!1}else if(!Ko(t.queryKey,d))return!1}if(s!=="all"){const p=t.isActive();if(s==="active"&&!p||s==="inactive"&&p)return!1}return!(typeof h=="boolean"&&t.isStale()!==h||a&&a!==t.state.fetchStatus||u&&!u(t))}function jp(r,t){const{exact:s,status:o,predicate:a,mutationKey:u}=r;if(u){if(!t.options.mutationKey)return!1;if(s){if(Qo(t.options.mutationKey)!==Qo(u))return!1}else if(!Ko(t.options.mutationKey,u))return!1}return!(o&&t.state.status!==o||a&&!a(t))}function Zc(r,t){return((t==null?void 0:t.queryKeyHashFn)||Qo)(r)}function Qo(r){return JSON.stringify(r,(t,s)=>gc(s)?Object.keys(s).sort().reduce((o,a)=>(o[a]=s[a],o),{}):s)}function Ko(r,t){return r===t?!0:typeof r!=typeof t?!1:r&&t&&typeof r=="object"&&typeof t=="object"?Object.keys(t).every(s=>Ko(r[s],t[s])):!1}var MS=Object.prototype.hasOwnProperty;function Yy(r,t,s=0){if(r===t)return r;if(s>500)return t;const o=Mp(r)&&Mp(t);if(!o&&!(gc(r)&&gc(t)))return t;const u=(o?r:Object.keys(r)).length,d=o?t:Object.keys(t),h=d.length,p=o?new Array(h):{};let m=0;for(let g=0;g{jr.setTimeout(t,r)})}function vc(r,t,s){return typeof s.structuralSharing=="function"?s.structuralSharing(r,t):s.structuralSharing!==!1?Yy(r,t):t}function US(r,t,s=0){const o=[...r,t];return s&&o.length>s?o.slice(1):o}function zS(r,t,s=0){const o=[t,...r];return s&&o.length>s?o.slice(0,-1):o}var ed=Symbol();function Zy(r,t){return!r.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!r.queryFn||r.queryFn===ed?()=>Promise.reject(new Error(`Missing queryFn: '${r.queryHash}'`)):r.queryFn}function eg(r,t){return typeof r=="function"?r(...t):!!r}function BS(r,t,s){let o=!1,a;return Object.defineProperty(r,"signal",{enumerable:!0,get:()=>(a??(a=t()),o||(o=!0,a.aborted?s():a.addEventListener("abort",s,{once:!0})),a)}),r}var Fr,ar,Ps,Vm,$S=(Vm=class extends si{constructor(){super();pe(this,Fr);pe(this,ar);pe(this,Ps);ee(this,Ps,t=>{if(!Xr&&window.addEventListener){const s=()=>t();return window.addEventListener("visibilitychange",s,!1),()=>{window.removeEventListener("visibilitychange",s)}}})}onSubscribe(){R(this,ar)||this.setEventListener(R(this,Ps))}onUnsubscribe(){var t;this.hasListeners()||((t=R(this,ar))==null||t.call(this),ee(this,ar,void 0))}setEventListener(t){var s;ee(this,Ps,t),(s=R(this,ar))==null||s.call(this),ee(this,ar,t(o=>{typeof o=="boolean"?this.setFocused(o):this.onFocus()}))}setFocused(t){R(this,Fr)!==t&&(ee(this,Fr,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(s=>{s(t)})}isFocused(){var t;return typeof R(this,Fr)=="boolean"?R(this,Fr):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Fr=new WeakMap,ar=new WeakMap,Ps=new WeakMap,Vm),td=new $S;function wc(){let r,t;const s=new Promise((a,u)=>{r=a,t=u});s.status="pending",s.catch(()=>{});function o(a){Object.assign(s,a),delete s.resolve,delete s.reject}return s.resolve=a=>{o({status:"fulfilled",value:a}),r(a)},s.reject=a=>{o({status:"rejected",reason:a}),t(a)},s}var VS=DS;function HS(){let r=[],t=0,s=h=>{h()},o=h=>{h()},a=VS;const u=h=>{t?r.push(h):a(()=>{s(h)})},d=()=>{const h=r;r=[],h.length&&a(()=>{o(()=>{h.forEach(p=>{s(p)})})})};return{batch:h=>{let p;t++;try{p=h()}finally{t--,t||d()}return p},batchCalls:h=>(...p)=>{u(()=>{h(...p)})},schedule:u,setNotifyFunction:h=>{s=h},setBatchNotifyFunction:h=>{o=h},setScheduler:h=>{a=h}}}var dt=HS(),Os,lr,Ns,Hm,qS=(Hm=class extends si{constructor(){super();pe(this,Os,!0);pe(this,lr);pe(this,Ns);ee(this,Ns,t=>{if(!Xr&&window.addEventListener){const s=()=>t(!0),o=()=>t(!1);return window.addEventListener("online",s,!1),window.addEventListener("offline",o,!1),()=>{window.removeEventListener("online",s),window.removeEventListener("offline",o)}}})}onSubscribe(){R(this,lr)||this.setEventListener(R(this,Ns))}onUnsubscribe(){var t;this.hasListeners()||((t=R(this,lr))==null||t.call(this),ee(this,lr,void 0))}setEventListener(t){var s;ee(this,Ns,t),(s=R(this,lr))==null||s.call(this),ee(this,lr,t(this.setOnline.bind(this)))}setOnline(t){R(this,Os)!==t&&(ee(this,Os,t),this.listeners.forEach(o=>{o(t)}))}isOnline(){return R(this,Os)}},Os=new WeakMap,lr=new WeakMap,Ns=new WeakMap,Hm),Ba=new qS;function WS(r){return Math.min(1e3*2**r,3e4)}function tg(r){return(r??"online")==="online"?Ba.isOnline():!0}var xc=class extends Error{constructor(r){super("CancelledError"),this.revert=r==null?void 0:r.revert,this.silent=r==null?void 0:r.silent}};function ng(r){let t=!1,s=0,o;const a=wc(),u=()=>a.status!=="pending",d=k=>{var w;if(!u()){const S=new xc(k);C(S),(w=r.onCancel)==null||w.call(r,S)}},h=()=>{t=!0},p=()=>{t=!1},m=()=>td.isFocused()&&(r.networkMode==="always"||Ba.isOnline())&&r.canRun(),g=()=>tg(r.networkMode)&&r.canRun(),v=k=>{u()||(o==null||o(),a.resolve(k))},C=k=>{u()||(o==null||o(),a.reject(k))},L=()=>new Promise(k=>{var w;o=S=>{(u()||m())&&k(S)},(w=r.onPause)==null||w.call(r)}).then(()=>{var k;o=void 0,u()||(k=r.onContinue)==null||k.call(r)}),F=()=>{if(u())return;let k;const w=s===0?r.initialPromise:void 0;try{k=w??r.fn()}catch(S){k=Promise.reject(S)}Promise.resolve(k).then(v).catch(S=>{var $;if(u())return;const I=r.retry??(Xr?0:3),P=r.retryDelay??WS,A=typeof P=="function"?P(s,S):P,V=I===!0||typeof I=="number"&&sm()?void 0:L()).then(()=>{t?C(S):F()})})};return{promise:a,status:()=>a.status,cancel:d,continue:()=>(o==null||o(),a),cancelRetry:h,continueRetry:p,canStart:g,start:()=>(g()?F():L().then(F),a)}}var Ur,qm,rg=(qm=class{constructor(){pe(this,Ur)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),mc(this.gcTime)&&ee(this,Ur,jr.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(r){this.gcTime=Math.max(this.gcTime||0,r??(Xr?1/0:300*1e3))}clearGcTimeout(){R(this,Ur)&&(jr.clearTimeout(R(this,Ur)),ee(this,Ur,void 0))}},Ur=new WeakMap,qm),zr,As,Wt,Br,ot,Yo,$r,on,Nn,Wm,QS=(Wm=class extends rg{constructor(t){super();pe(this,on);pe(this,zr);pe(this,As);pe(this,Wt);pe(this,Br);pe(this,ot);pe(this,Yo);pe(this,$r);ee(this,$r,!1),ee(this,Yo,t.defaultOptions),this.setOptions(t.options),this.observers=[],ee(this,Br,t.client),ee(this,Wt,R(this,Br).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,ee(this,zr,zp(this.options)),this.state=t.state??R(this,zr),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=R(this,ot))==null?void 0:t.promise}setOptions(t){if(this.options={...R(this,Yo),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const s=zp(this.options);s.data!==void 0&&(this.setState(Up(s.data,s.dataUpdatedAt)),ee(this,zr,s))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&R(this,Wt).remove(this)}setData(t,s){const o=vc(this.state.data,t,this.options);return Pe(this,on,Nn).call(this,{data:o,type:"success",dataUpdatedAt:s==null?void 0:s.updatedAt,manual:s==null?void 0:s.manual}),o}setState(t,s){Pe(this,on,Nn).call(this,{type:"setState",state:t,setStateOptions:s})}cancel(t){var o,a;const s=(o=R(this,ot))==null?void 0:o.promise;return(a=R(this,ot))==null||a.cancel(t),s?s.then(Ot).catch(Ot):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(R(this,zr))}isActive(){return this.observers.some(t=>Qt(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===ed||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>mr(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!Xy(this.state.dataUpdatedAt,t)}onFocus(){var s;const t=this.observers.find(o=>o.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(s=R(this,ot))==null||s.continue()}onOnline(){var s;const t=this.observers.find(o=>o.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(s=R(this,ot))==null||s.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),R(this,Wt).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(s=>s!==t),this.observers.length||(R(this,ot)&&(R(this,$r)?R(this,ot).cancel({revert:!0}):R(this,ot).cancelRetry()),this.scheduleGc()),R(this,Wt).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Pe(this,on,Nn).call(this,{type:"invalidate"})}async fetch(t,s){var p,m,g,v,C,L,F,k,w,S,I,P;if(this.state.fetchStatus!=="idle"&&((p=R(this,ot))==null?void 0:p.status())!=="rejected"){if(this.state.data!==void 0&&(s!=null&&s.cancelRefetch))this.cancel({silent:!0});else if(R(this,ot))return R(this,ot).continueRetry(),R(this,ot).promise}if(t&&this.setOptions(t),!this.options.queryFn){const A=this.observers.find(V=>V.options.queryFn);A&&this.setOptions(A.options)}const o=new AbortController,a=A=>{Object.defineProperty(A,"signal",{enumerable:!0,get:()=>(ee(this,$r,!0),o.signal)})},u=()=>{const A=Zy(this.options,s),$=(()=>{const G={client:R(this,Br),queryKey:this.queryKey,meta:this.meta};return a(G),G})();return ee(this,$r,!1),this.options.persister?this.options.persister(A,$,this):A($)},h=(()=>{const A={fetchOptions:s,options:this.options,queryKey:this.queryKey,client:R(this,Br),state:this.state,fetchFn:u};return a(A),A})();(m=this.options.behavior)==null||m.onFetch(h,this),ee(this,As,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((g=h.fetchOptions)==null?void 0:g.meta))&&Pe(this,on,Nn).call(this,{type:"fetch",meta:(v=h.fetchOptions)==null?void 0:v.meta}),ee(this,ot,ng({initialPromise:s==null?void 0:s.initialPromise,fn:h.fetchFn,onCancel:A=>{A instanceof xc&&A.revert&&this.setState({...R(this,As),fetchStatus:"idle"}),o.abort()},onFail:(A,V)=>{Pe(this,on,Nn).call(this,{type:"failed",failureCount:A,error:V})},onPause:()=>{Pe(this,on,Nn).call(this,{type:"pause"})},onContinue:()=>{Pe(this,on,Nn).call(this,{type:"continue"})},retry:h.options.retry,retryDelay:h.options.retryDelay,networkMode:h.options.networkMode,canRun:()=>!0}));try{const A=await R(this,ot).start();if(A===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(A),(L=(C=R(this,Wt).config).onSuccess)==null||L.call(C,A,this),(k=(F=R(this,Wt).config).onSettled)==null||k.call(F,A,this.state.error,this),A}catch(A){if(A instanceof xc){if(A.silent)return R(this,ot).promise;if(A.revert){if(this.state.data===void 0)throw A;return this.state.data}}throw Pe(this,on,Nn).call(this,{type:"error",error:A}),(S=(w=R(this,Wt).config).onError)==null||S.call(w,A,this),(P=(I=R(this,Wt).config).onSettled)==null||P.call(I,this.state.data,A,this),A}finally{this.scheduleGc()}}},zr=new WeakMap,As=new WeakMap,Wt=new WeakMap,Br=new WeakMap,ot=new WeakMap,Yo=new WeakMap,$r=new WeakMap,on=new WeakSet,Nn=function(t){const s=o=>{switch(t.type){case"failed":return{...o,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...o,fetchStatus:"paused"};case"continue":return{...o,fetchStatus:"fetching"};case"fetch":return{...o,...sg(o.data,this.options),fetchMeta:t.meta??null};case"success":const a={...o,...Up(t.data,t.dataUpdatedAt),dataUpdateCount:o.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return ee(this,As,t.manual?a:void 0),a;case"error":const u=t.error;return{...o,error:u,errorUpdateCount:o.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:o.fetchFailureCount+1,fetchFailureReason:u,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...o,isInvalidated:!0};case"setState":return{...o,...t.state}}};this.state=s(this.state),dt.batch(()=>{this.observers.forEach(o=>{o.onQueryUpdate()}),R(this,Wt).notify({query:this,type:"updated",action:t})})},Wm);function sg(r,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:tg(t.networkMode)?"fetching":"paused",...r===void 0&&{error:null,status:"pending"}}}function Up(r,t){return{data:r,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function zp(r){const t=typeof r.initialData=="function"?r.initialData():r.initialData,s=t!==void 0,o=s?typeof r.initialDataUpdatedAt=="function"?r.initialDataUpdatedAt():r.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:s?o??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:s?"success":"pending",fetchStatus:"idle"}}var Pt,Oe,Zo,Et,Vr,Ls,An,ur,ei,Is,Ds,Hr,qr,cr,js,De,Uo,Sc,Ec,_c,kc,Cc,bc,Rc,og,Qm,KS=(Qm=class extends si{constructor(t,s){super();pe(this,De);pe(this,Pt);pe(this,Oe);pe(this,Zo);pe(this,Et);pe(this,Vr);pe(this,Ls);pe(this,An);pe(this,ur);pe(this,ei);pe(this,Is);pe(this,Ds);pe(this,Hr);pe(this,qr);pe(this,cr);pe(this,js,new Set);this.options=s,ee(this,Pt,t),ee(this,ur,null),ee(this,An,wc()),this.bindMethods(),this.setOptions(s)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(R(this,Oe).addObserver(this),Bp(R(this,Oe),this.options)?Pe(this,De,Uo).call(this):this.updateResult(),Pe(this,De,kc).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Tc(R(this,Oe),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Tc(R(this,Oe),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Pe(this,De,Cc).call(this),Pe(this,De,bc).call(this),R(this,Oe).removeObserver(this)}setOptions(t){const s=this.options,o=R(this,Oe);if(this.options=R(this,Pt).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Qt(this.options.enabled,R(this,Oe))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Pe(this,De,Rc).call(this),R(this,Oe).setOptions(this.options),s._defaulted&&!yc(this.options,s)&&R(this,Pt).getQueryCache().notify({type:"observerOptionsUpdated",query:R(this,Oe),observer:this});const a=this.hasListeners();a&&$p(R(this,Oe),o,this.options,s)&&Pe(this,De,Uo).call(this),this.updateResult(),a&&(R(this,Oe)!==o||Qt(this.options.enabled,R(this,Oe))!==Qt(s.enabled,R(this,Oe))||mr(this.options.staleTime,R(this,Oe))!==mr(s.staleTime,R(this,Oe)))&&Pe(this,De,Sc).call(this);const u=Pe(this,De,Ec).call(this);a&&(R(this,Oe)!==o||Qt(this.options.enabled,R(this,Oe))!==Qt(s.enabled,R(this,Oe))||u!==R(this,cr))&&Pe(this,De,_c).call(this,u)}getOptimisticResult(t){const s=R(this,Pt).getQueryCache().build(R(this,Pt),t),o=this.createResult(s,t);return JS(this,o)&&(ee(this,Et,o),ee(this,Ls,this.options),ee(this,Vr,R(this,Oe).state)),o}getCurrentResult(){return R(this,Et)}trackResult(t,s){return new Proxy(t,{get:(o,a)=>(this.trackProp(a),s==null||s(a),a==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&R(this,An).status==="pending"&&R(this,An).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(o,a))})}trackProp(t){R(this,js).add(t)}getCurrentQuery(){return R(this,Oe)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const s=R(this,Pt).defaultQueryOptions(t),o=R(this,Pt).getQueryCache().build(R(this,Pt),s);return o.fetch().then(()=>this.createResult(o,s))}fetch(t){return Pe(this,De,Uo).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),R(this,Et)))}createResult(t,s){var ie;const o=R(this,Oe),a=this.options,u=R(this,Et),d=R(this,Vr),h=R(this,Ls),m=t!==o?t.state:R(this,Zo),{state:g}=t;let v={...g},C=!1,L;if(s._optimisticResults){const ue=this.hasListeners(),Se=!ue&&Bp(t,s),Te=ue&&$p(t,o,s,a);(Se||Te)&&(v={...v,...sg(g.data,t.options)}),s._optimisticResults==="isRestoring"&&(v.fetchStatus="idle")}let{error:F,errorUpdatedAt:k,status:w}=v;L=v.data;let S=!1;if(s.placeholderData!==void 0&&L===void 0&&w==="pending"){let ue;u!=null&&u.isPlaceholderData&&s.placeholderData===(h==null?void 0:h.placeholderData)?(ue=u.data,S=!0):ue=typeof s.placeholderData=="function"?s.placeholderData((ie=R(this,Ds))==null?void 0:ie.state.data,R(this,Ds)):s.placeholderData,ue!==void 0&&(w="success",L=vc(u==null?void 0:u.data,ue,s),C=!0)}if(s.select&&L!==void 0&&!S)if(u&&L===(d==null?void 0:d.data)&&s.select===R(this,ei))L=R(this,Is);else try{ee(this,ei,s.select),L=s.select(L),L=vc(u==null?void 0:u.data,L,s),ee(this,Is,L),ee(this,ur,null)}catch(ue){ee(this,ur,ue)}R(this,ur)&&(F=R(this,ur),L=R(this,Is),k=Date.now(),w="error");const I=v.fetchStatus==="fetching",P=w==="pending",A=w==="error",V=P&&I,$=L!==void 0,B={status:w,fetchStatus:v.fetchStatus,isPending:P,isSuccess:w==="success",isError:A,isInitialLoading:V,isLoading:V,data:L,dataUpdatedAt:v.dataUpdatedAt,error:F,errorUpdatedAt:k,failureCount:v.fetchFailureCount,failureReason:v.fetchFailureReason,errorUpdateCount:v.errorUpdateCount,isFetched:v.dataUpdateCount>0||v.errorUpdateCount>0,isFetchedAfterMount:v.dataUpdateCount>m.dataUpdateCount||v.errorUpdateCount>m.errorUpdateCount,isFetching:I,isRefetching:I&&!P,isLoadingError:A&&!$,isPaused:v.fetchStatus==="paused",isPlaceholderData:C,isRefetchError:A&&$,isStale:nd(t,s),refetch:this.refetch,promise:R(this,An),isEnabled:Qt(s.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const ue=B.data!==void 0,Se=B.status==="error"&&!ue,Te=_e=>{Se?_e.reject(B.error):ue&&_e.resolve(B.data)},xe=()=>{const _e=ee(this,An,B.promise=wc());Te(_e)},Y=R(this,An);switch(Y.status){case"pending":t.queryHash===o.queryHash&&Te(Y);break;case"fulfilled":(Se||B.data!==Y.value)&&xe();break;case"rejected":(!Se||B.error!==Y.reason)&&xe();break}}return B}updateResult(){const t=R(this,Et),s=this.createResult(R(this,Oe),this.options);if(ee(this,Vr,R(this,Oe).state),ee(this,Ls,this.options),R(this,Vr).data!==void 0&&ee(this,Ds,R(this,Oe)),yc(s,t))return;ee(this,Et,s);const o=()=>{if(!t)return!0;const{notifyOnChangeProps:a}=this.options,u=typeof a=="function"?a():a;if(u==="all"||!u&&!R(this,js).size)return!0;const d=new Set(u??R(this,js));return this.options.throwOnError&&d.add("error"),Object.keys(R(this,Et)).some(h=>{const p=h;return R(this,Et)[p]!==t[p]&&d.has(p)})};Pe(this,De,og).call(this,{listeners:o()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Pe(this,De,kc).call(this)}},Pt=new WeakMap,Oe=new WeakMap,Zo=new WeakMap,Et=new WeakMap,Vr=new WeakMap,Ls=new WeakMap,An=new WeakMap,ur=new WeakMap,ei=new WeakMap,Is=new WeakMap,Ds=new WeakMap,Hr=new WeakMap,qr=new WeakMap,cr=new WeakMap,js=new WeakMap,De=new WeakSet,Uo=function(t){Pe(this,De,Rc).call(this);let s=R(this,Oe).fetch(this.options,t);return t!=null&&t.throwOnError||(s=s.catch(Ot)),s},Sc=function(){Pe(this,De,Cc).call(this);const t=mr(this.options.staleTime,R(this,Oe));if(Xr||R(this,Et).isStale||!mc(t))return;const o=Xy(R(this,Et).dataUpdatedAt,t)+1;ee(this,Hr,jr.setTimeout(()=>{R(this,Et).isStale||this.updateResult()},o))},Ec=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(R(this,Oe)):this.options.refetchInterval)??!1},_c=function(t){Pe(this,De,bc).call(this),ee(this,cr,t),!(Xr||Qt(this.options.enabled,R(this,Oe))===!1||!mc(R(this,cr))||R(this,cr)===0)&&ee(this,qr,jr.setInterval(()=>{(this.options.refetchIntervalInBackground||td.isFocused())&&Pe(this,De,Uo).call(this)},R(this,cr)))},kc=function(){Pe(this,De,Sc).call(this),Pe(this,De,_c).call(this,Pe(this,De,Ec).call(this))},Cc=function(){R(this,Hr)&&(jr.clearTimeout(R(this,Hr)),ee(this,Hr,void 0))},bc=function(){R(this,qr)&&(jr.clearInterval(R(this,qr)),ee(this,qr,void 0))},Rc=function(){const t=R(this,Pt).getQueryCache().build(R(this,Pt),this.options);if(t===R(this,Oe))return;const s=R(this,Oe);ee(this,Oe,t),ee(this,Zo,t.state),this.hasListeners()&&(s==null||s.removeObserver(this),t.addObserver(this))},og=function(t){dt.batch(()=>{t.listeners&&this.listeners.forEach(s=>{s(R(this,Et))}),R(this,Pt).getQueryCache().notify({query:R(this,Oe),type:"observerResultsUpdated"})})},Qm);function GS(r,t){return Qt(t.enabled,r)!==!1&&r.state.data===void 0&&!(r.state.status==="error"&&t.retryOnMount===!1)}function Bp(r,t){return GS(r,t)||r.state.data!==void 0&&Tc(r,t,t.refetchOnMount)}function Tc(r,t,s){if(Qt(t.enabled,r)!==!1&&mr(t.staleTime,r)!=="static"){const o=typeof s=="function"?s(r):s;return o==="always"||o!==!1&&nd(r,t)}return!1}function $p(r,t,s,o){return(r!==t||Qt(o.enabled,r)===!1)&&(!s.suspense||r.state.status!=="error")&&nd(r,s)}function nd(r,t){return Qt(t.enabled,r)!==!1&&r.isStaleByTime(mr(t.staleTime,r))}function JS(r,t){return!yc(r.getCurrentResult(),t)}function Vp(r){return{onFetch:(t,s)=>{var g,v,C,L,F;const o=t.options,a=(C=(v=(g=t.fetchOptions)==null?void 0:g.meta)==null?void 0:v.fetchMore)==null?void 0:C.direction,u=((L=t.state.data)==null?void 0:L.pages)||[],d=((F=t.state.data)==null?void 0:F.pageParams)||[];let h={pages:[],pageParams:[]},p=0;const m=async()=>{let k=!1;const w=P=>{BS(P,()=>t.signal,()=>k=!0)},S=Zy(t.options,t.fetchOptions),I=async(P,A,V)=>{if(k)return Promise.reject();if(A==null&&P.pages.length)return Promise.resolve(P);const G=(()=>{const Se={client:t.client,queryKey:t.queryKey,pageParam:A,direction:V?"backward":"forward",meta:t.options.meta};return w(Se),Se})(),B=await S(G),{maxPages:ie}=t.options,ue=V?zS:US;return{pages:ue(P.pages,B,ie),pageParams:ue(P.pageParams,A,ie)}};if(a&&u.length){const P=a==="backward",A=P?XS:Hp,V={pages:u,pageParams:d},$=A(o,V);h=await I(V,$,P)}else{const P=r??u.length;do{const A=p===0?d[0]??o.initialPageParam:Hp(o,h);if(p>0&&A==null)break;h=await I(h,A),p++}while(p{var k,w;return(w=(k=t.options).persister)==null?void 0:w.call(k,m,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},s)}:t.fetchFn=m}}}function Hp(r,{pages:t,pageParams:s}){const o=t.length-1;return t.length>0?r.getNextPageParam(t[o],t,s[o],s):void 0}function XS(r,{pages:t,pageParams:s}){var o;return t.length>0?(o=r.getPreviousPageParam)==null?void 0:o.call(r,t[0],t,s[0],s):void 0}var ti,mn,vt,Wr,yn,or,Km,YS=(Km=class extends rg{constructor(t){super();pe(this,yn);pe(this,ti);pe(this,mn);pe(this,vt);pe(this,Wr);ee(this,ti,t.client),this.mutationId=t.mutationId,ee(this,vt,t.mutationCache),ee(this,mn,[]),this.state=t.state||ZS(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){R(this,mn).includes(t)||(R(this,mn).push(t),this.clearGcTimeout(),R(this,vt).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){ee(this,mn,R(this,mn).filter(s=>s!==t)),this.scheduleGc(),R(this,vt).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){R(this,mn).length||(this.state.status==="pending"?this.scheduleGc():R(this,vt).remove(this))}continue(){var t;return((t=R(this,Wr))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var d,h,p,m,g,v,C,L,F,k,w,S,I,P,A,V,$,G;const s=()=>{Pe(this,yn,or).call(this,{type:"continue"})},o={client:R(this,ti),meta:this.options.meta,mutationKey:this.options.mutationKey};ee(this,Wr,ng({fn:()=>this.options.mutationFn?this.options.mutationFn(t,o):Promise.reject(new Error("No mutationFn found")),onFail:(B,ie)=>{Pe(this,yn,or).call(this,{type:"failed",failureCount:B,error:ie})},onPause:()=>{Pe(this,yn,or).call(this,{type:"pause"})},onContinue:s,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>R(this,vt).canRun(this)}));const a=this.state.status==="pending",u=!R(this,Wr).canStart();try{if(a)s();else{Pe(this,yn,or).call(this,{type:"pending",variables:t,isPaused:u}),R(this,vt).config.onMutate&&await R(this,vt).config.onMutate(t,this,o);const ie=await((h=(d=this.options).onMutate)==null?void 0:h.call(d,t,o));ie!==this.state.context&&Pe(this,yn,or).call(this,{type:"pending",context:ie,variables:t,isPaused:u})}const B=await R(this,Wr).start();return await((m=(p=R(this,vt).config).onSuccess)==null?void 0:m.call(p,B,t,this.state.context,this,o)),await((v=(g=this.options).onSuccess)==null?void 0:v.call(g,B,t,this.state.context,o)),await((L=(C=R(this,vt).config).onSettled)==null?void 0:L.call(C,B,null,this.state.variables,this.state.context,this,o)),await((k=(F=this.options).onSettled)==null?void 0:k.call(F,B,null,t,this.state.context,o)),Pe(this,yn,or).call(this,{type:"success",data:B}),B}catch(B){try{await((S=(w=R(this,vt).config).onError)==null?void 0:S.call(w,B,t,this.state.context,this,o))}catch(ie){Promise.reject(ie)}try{await((P=(I=this.options).onError)==null?void 0:P.call(I,B,t,this.state.context,o))}catch(ie){Promise.reject(ie)}try{await((V=(A=R(this,vt).config).onSettled)==null?void 0:V.call(A,void 0,B,this.state.variables,this.state.context,this,o))}catch(ie){Promise.reject(ie)}try{await((G=($=this.options).onSettled)==null?void 0:G.call($,void 0,B,t,this.state.context,o))}catch(ie){Promise.reject(ie)}throw Pe(this,yn,or).call(this,{type:"error",error:B}),B}finally{R(this,vt).runNext(this)}}},ti=new WeakMap,mn=new WeakMap,vt=new WeakMap,Wr=new WeakMap,yn=new WeakSet,or=function(t){const s=o=>{switch(t.type){case"failed":return{...o,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...o,isPaused:!0};case"continue":return{...o,isPaused:!1};case"pending":return{...o,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...o,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...o,data:void 0,error:t.error,failureCount:o.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=s(this.state),dt.batch(()=>{R(this,mn).forEach(o=>{o.onMutationUpdate(t)}),R(this,vt).notify({mutation:this,type:"updated",action:t})})},Km);function ZS(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Ln,an,ni,Gm,eE=(Gm=class extends si{constructor(t={}){super();pe(this,Ln);pe(this,an);pe(this,ni);this.config=t,ee(this,Ln,new Set),ee(this,an,new Map),ee(this,ni,0)}build(t,s,o){const a=new YS({client:t,mutationCache:this,mutationId:++wa(this,ni)._,options:t.defaultMutationOptions(s),state:o});return this.add(a),a}add(t){R(this,Ln).add(t);const s=Ca(t);if(typeof s=="string"){const o=R(this,an).get(s);o?o.push(t):R(this,an).set(s,[t])}this.notify({type:"added",mutation:t})}remove(t){if(R(this,Ln).delete(t)){const s=Ca(t);if(typeof s=="string"){const o=R(this,an).get(s);if(o)if(o.length>1){const a=o.indexOf(t);a!==-1&&o.splice(a,1)}else o[0]===t&&R(this,an).delete(s)}}this.notify({type:"removed",mutation:t})}canRun(t){const s=Ca(t);if(typeof s=="string"){const o=R(this,an).get(s),a=o==null?void 0:o.find(u=>u.state.status==="pending");return!a||a===t}else return!0}runNext(t){var o;const s=Ca(t);if(typeof s=="string"){const a=(o=R(this,an).get(s))==null?void 0:o.find(u=>u!==t&&u.state.isPaused);return(a==null?void 0:a.continue())??Promise.resolve()}else return Promise.resolve()}clear(){dt.batch(()=>{R(this,Ln).forEach(t=>{this.notify({type:"removed",mutation:t})}),R(this,Ln).clear(),R(this,an).clear()})}getAll(){return Array.from(R(this,Ln))}find(t){const s={exact:!0,...t};return this.getAll().find(o=>jp(s,o))}findAll(t={}){return this.getAll().filter(s=>jp(t,s))}notify(t){dt.batch(()=>{this.listeners.forEach(s=>{s(t)})})}resumePausedMutations(){const t=this.getAll().filter(s=>s.state.isPaused);return dt.batch(()=>Promise.all(t.map(s=>s.continue().catch(Ot))))}},Ln=new WeakMap,an=new WeakMap,ni=new WeakMap,Gm);function Ca(r){var t;return(t=r.options.scope)==null?void 0:t.id}var gn,Jm,tE=(Jm=class extends si{constructor(t={}){super();pe(this,gn);this.config=t,ee(this,gn,new Map)}build(t,s,o){const a=s.queryKey,u=s.queryHash??Zc(a,s);let d=this.get(u);return d||(d=new QS({client:t,queryKey:a,queryHash:u,options:t.defaultQueryOptions(s),state:o,defaultOptions:t.getQueryDefaults(a)}),this.add(d)),d}add(t){R(this,gn).has(t.queryHash)||(R(this,gn).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const s=R(this,gn).get(t.queryHash);s&&(t.destroy(),s===t&&R(this,gn).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){dt.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return R(this,gn).get(t)}getAll(){return[...R(this,gn).values()]}find(t){const s={exact:!0,...t};return this.getAll().find(o=>Dp(s,o))}findAll(t={}){const s=this.getAll();return Object.keys(t).length>0?s.filter(o=>Dp(t,o)):s}notify(t){dt.batch(()=>{this.listeners.forEach(s=>{s(t)})})}onFocus(){dt.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){dt.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},gn=new WeakMap,Jm),qe,dr,fr,Ms,Fs,hr,Us,zs,Xm,nE=(Xm=class{constructor(r={}){pe(this,qe);pe(this,dr);pe(this,fr);pe(this,Ms);pe(this,Fs);pe(this,hr);pe(this,Us);pe(this,zs);ee(this,qe,r.queryCache||new tE),ee(this,dr,r.mutationCache||new eE),ee(this,fr,r.defaultOptions||{}),ee(this,Ms,new Map),ee(this,Fs,new Map),ee(this,hr,0)}mount(){wa(this,hr)._++,R(this,hr)===1&&(ee(this,Us,td.subscribe(async r=>{r&&(await this.resumePausedMutations(),R(this,qe).onFocus())})),ee(this,zs,Ba.subscribe(async r=>{r&&(await this.resumePausedMutations(),R(this,qe).onOnline())})))}unmount(){var r,t;wa(this,hr)._--,R(this,hr)===0&&((r=R(this,Us))==null||r.call(this),ee(this,Us,void 0),(t=R(this,zs))==null||t.call(this),ee(this,zs,void 0))}isFetching(r){return R(this,qe).findAll({...r,fetchStatus:"fetching"}).length}isMutating(r){return R(this,dr).findAll({...r,status:"pending"}).length}getQueryData(r){var s;const t=this.defaultQueryOptions({queryKey:r});return(s=R(this,qe).get(t.queryHash))==null?void 0:s.state.data}ensureQueryData(r){const t=this.defaultQueryOptions(r),s=R(this,qe).build(this,t),o=s.state.data;return o===void 0?this.fetchQuery(r):(r.revalidateIfStale&&s.isStaleByTime(mr(t.staleTime,s))&&this.prefetchQuery(t),Promise.resolve(o))}getQueriesData(r){return R(this,qe).findAll(r).map(({queryKey:t,state:s})=>{const o=s.data;return[t,o]})}setQueryData(r,t,s){const o=this.defaultQueryOptions({queryKey:r}),a=R(this,qe).get(o.queryHash),u=a==null?void 0:a.state.data,d=jS(t,u);if(d!==void 0)return R(this,qe).build(this,o).setData(d,{...s,manual:!0})}setQueriesData(r,t,s){return dt.batch(()=>R(this,qe).findAll(r).map(({queryKey:o})=>[o,this.setQueryData(o,t,s)]))}getQueryState(r){var s;const t=this.defaultQueryOptions({queryKey:r});return(s=R(this,qe).get(t.queryHash))==null?void 0:s.state}removeQueries(r){const t=R(this,qe);dt.batch(()=>{t.findAll(r).forEach(s=>{t.remove(s)})})}resetQueries(r,t){const s=R(this,qe);return dt.batch(()=>(s.findAll(r).forEach(o=>{o.reset()}),this.refetchQueries({type:"active",...r},t)))}cancelQueries(r,t={}){const s={revert:!0,...t},o=dt.batch(()=>R(this,qe).findAll(r).map(a=>a.cancel(s)));return Promise.all(o).then(Ot).catch(Ot)}invalidateQueries(r,t={}){return dt.batch(()=>(R(this,qe).findAll(r).forEach(s=>{s.invalidate()}),(r==null?void 0:r.refetchType)==="none"?Promise.resolve():this.refetchQueries({...r,type:(r==null?void 0:r.refetchType)??(r==null?void 0:r.type)??"active"},t)))}refetchQueries(r,t={}){const s={...t,cancelRefetch:t.cancelRefetch??!0},o=dt.batch(()=>R(this,qe).findAll(r).filter(a=>!a.isDisabled()&&!a.isStatic()).map(a=>{let u=a.fetch(void 0,s);return s.throwOnError||(u=u.catch(Ot)),a.state.fetchStatus==="paused"?Promise.resolve():u}));return Promise.all(o).then(Ot)}fetchQuery(r){const t=this.defaultQueryOptions(r);t.retry===void 0&&(t.retry=!1);const s=R(this,qe).build(this,t);return s.isStaleByTime(mr(t.staleTime,s))?s.fetch(t):Promise.resolve(s.state.data)}prefetchQuery(r){return this.fetchQuery(r).then(Ot).catch(Ot)}fetchInfiniteQuery(r){return r.behavior=Vp(r.pages),this.fetchQuery(r)}prefetchInfiniteQuery(r){return this.fetchInfiniteQuery(r).then(Ot).catch(Ot)}ensureInfiniteQueryData(r){return r.behavior=Vp(r.pages),this.ensureQueryData(r)}resumePausedMutations(){return Ba.isOnline()?R(this,dr).resumePausedMutations():Promise.resolve()}getQueryCache(){return R(this,qe)}getMutationCache(){return R(this,dr)}getDefaultOptions(){return R(this,fr)}setDefaultOptions(r){ee(this,fr,r)}setQueryDefaults(r,t){R(this,Ms).set(Qo(r),{queryKey:r,defaultOptions:t})}getQueryDefaults(r){const t=[...R(this,Ms).values()],s={};return t.forEach(o=>{Ko(r,o.queryKey)&&Object.assign(s,o.defaultOptions)}),s}setMutationDefaults(r,t){R(this,Fs).set(Qo(r),{mutationKey:r,defaultOptions:t})}getMutationDefaults(r){const t=[...R(this,Fs).values()],s={};return t.forEach(o=>{Ko(r,o.mutationKey)&&Object.assign(s,o.defaultOptions)}),s}defaultQueryOptions(r){if(r._defaulted)return r;const t={...R(this,fr).queries,...this.getQueryDefaults(r.queryKey),...r,_defaulted:!0};return t.queryHash||(t.queryHash=Zc(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===ed&&(t.enabled=!1),t}defaultMutationOptions(r){return r!=null&&r._defaulted?r:{...R(this,fr).mutations,...(r==null?void 0:r.mutationKey)&&this.getMutationDefaults(r.mutationKey),...r,_defaulted:!0}}clear(){R(this,qe).clear(),R(this,dr).clear()}},qe=new WeakMap,dr=new WeakMap,fr=new WeakMap,Ms=new WeakMap,Fs=new WeakMap,hr=new WeakMap,Us=new WeakMap,zs=new WeakMap,Xm),ig=_.createContext(void 0),rE=r=>{const t=_.useContext(ig);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},sE=({client:r,children:t})=>(_.useEffect(()=>(r.mount(),()=>{r.unmount()}),[r]),E.jsx(ig.Provider,{value:r,children:t})),ag=_.createContext(!1),oE=()=>_.useContext(ag);ag.Provider;function iE(){let r=!1;return{clearReset:()=>{r=!1},reset:()=>{r=!0},isReset:()=>r}}var aE=_.createContext(iE()),lE=()=>_.useContext(aE),uE=(r,t,s)=>{const o=s!=null&&s.state.error&&typeof r.throwOnError=="function"?eg(r.throwOnError,[s.state.error,s]):r.throwOnError;(r.suspense||r.experimental_prefetchInRender||o)&&(t.isReset()||(r.retryOnMount=!1))},cE=r=>{_.useEffect(()=>{r.clearReset()},[r])},dE=({result:r,errorResetBoundary:t,throwOnError:s,query:o,suspense:a})=>r.isError&&!t.isReset()&&!r.isFetching&&o&&(a&&r.data===void 0||eg(s,[r.error,o])),fE=r=>{if(r.suspense){const s=a=>a==="static"?a:Math.max(a??1e3,1e3),o=r.staleTime;r.staleTime=typeof o=="function"?(...a)=>s(o(...a)):s(o),typeof r.gcTime=="number"&&(r.gcTime=Math.max(r.gcTime,1e3))}},hE=(r,t)=>r.isLoading&&r.isFetching&&!t,pE=(r,t)=>(r==null?void 0:r.suspense)&&t.isPending,qp=(r,t,s)=>t.fetchOptimistic(r).catch(()=>{s.clearReset()});function mE(r,t,s){var C,L,F,k;const o=oE(),a=lE(),u=rE(),d=u.defaultQueryOptions(r);(L=(C=u.getDefaultOptions().queries)==null?void 0:C._experimental_beforeQuery)==null||L.call(C,d);const h=u.getQueryCache().get(d.queryHash);d._optimisticResults=o?"isRestoring":"optimistic",fE(d),uE(d,a,h),cE(a);const p=!u.getQueryCache().get(d.queryHash),[m]=_.useState(()=>new t(u,d)),g=m.getOptimisticResult(d),v=!o&&r.subscribed!==!1;if(_.useSyncExternalStore(_.useCallback(w=>{const S=v?m.subscribe(dt.batchCalls(w)):Ot;return m.updateResult(),S},[m,v]),()=>m.getCurrentResult(),()=>m.getCurrentResult()),_.useEffect(()=>{m.setOptions(d)},[d,m]),pE(d,g))throw qp(d,m,a);if(dE({result:g,errorResetBoundary:a,throwOnError:d.throwOnError,query:h,suspense:d.suspense}))throw g.error;if((k=(F=u.getDefaultOptions().queries)==null?void 0:F._experimental_afterQuery)==null||k.call(F,d,g),d.experimental_prefetchInRender&&!Xr&&hE(g,o)){const w=p?qp(d,m,a):h==null?void 0:h.promise;w==null||w.catch(Ot).finally(()=>{m.updateResult()})}return d.notifyOnChangeProps?g:m.trackResult(g)}function yE(r,t){return mE(r,KS)}const gE=new nE({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:1}}});/** * @remix-run/router v1.23.3 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function Go(){return Go=Object.assign?Object.assign.bind():function(r){for(var t=1;t"u")throw new Error(t)}function rd(r,t){if(!r){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function wE(){return Math.random().toString(36).substr(2,8)}function Qp(r,t){return{usr:r.state,key:r.key,idx:t}}function Pc(r,t,s,o){return s===void 0&&(s=null),Go({pathname:typeof r=="string"?r:r.pathname,search:"",hash:""},typeof t=="string"?Hs(t):t,{state:s,key:t&&t.key||o||wE()})}function $a(r){let{pathname:t="/",search:s="",hash:o=""}=r;return s&&s!=="?"&&(t+=s.charAt(0)==="?"?s:"?"+s),o&&o!=="#"&&(t+=o.charAt(0)==="#"?o:"#"+o),t}function Hs(r){let t={};if(r){let s=r.indexOf("#");s>=0&&(t.hash=r.substr(s),r=r.substr(0,s));let o=r.indexOf("?");o>=0&&(t.search=r.substr(o),r=r.substr(0,o)),r&&(t.pathname=r)}return t}function xE(r,t,s,o){o===void 0&&(o={});let{window:a=document.defaultView,v5Compat:u=!1}=o,d=a.history,h=pr.Pop,p=null,m=g();m==null&&(m=0,d.replaceState(Go({},d.state,{idx:m}),""));function g(){return(d.state||{idx:null}).idx}function v(){h=pr.Pop;let w=g(),S=w==null?null:w-m;m=w,p&&p({action:h,location:k.location,delta:S})}function C(w,S){h=pr.Push;let I=Pc(k.location,w,S);m=g()+1;let P=Qp(I,m),A=k.createHref(I);try{d.pushState(P,"",A)}catch(V){if(V instanceof DOMException&&V.name==="DataCloneError")throw V;a.location.assign(A)}u&&p&&p({action:h,location:k.location,delta:1})}function L(w,S){h=pr.Replace;let I=Pc(k.location,w,S);m=g();let P=Qp(I,m),A=k.createHref(I);d.replaceState(P,"",A),u&&p&&p({action:h,location:k.location,delta:0})}function F(w){let S=a.location.origin!=="null"?a.location.origin:a.location.href,I=typeof w=="string"?w:$a(w);return I=I.replace(/ $/,"%20"),Xe(S,"No window.location.(origin|href) available to create URL for href: "+I),new URL(I,S)}let k={get action(){return h},get location(){return r(a,d)},listen(w){if(p)throw new Error("A history only accepts one active listener");return a.addEventListener(Wp,v),p=w,()=>{a.removeEventListener(Wp,v),p=null}},createHref(w){return t(a,w)},createURL:F,encodeLocation(w){let S=F(w);return{pathname:S.pathname,search:S.search,hash:S.hash}},push:C,replace:L,go(w){return d.go(w)}};return k}var Kp;(function(r){r.data="data",r.deferred="deferred",r.redirect="redirect",r.error="error"})(Kp||(Kp={}));function SE(r,t,s){return s===void 0&&(s="/"),EE(r,t,s)}function EE(r,t,s,o){let a=typeof t=="string"?Hs(t):t,u=sd(a.pathname||"/",s);if(u==null)return null;let d=lg(r);_E(d);let h=null,p=DE(u);for(let m=0;h==null&&m{let p={relativePath:h===void 0?u.path||"":h,caseSensitive:u.caseSensitive===!0,childrenIndex:d,route:u};p.relativePath.startsWith("/")&&(Xe(p.relativePath.startsWith(o),'Absolute route path "'+p.relativePath+'" nested under path '+('"'+o+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),p.relativePath=p.relativePath.slice(o.length));let m=yr([o,p.relativePath]),g=s.concat(p);u.children&&u.children.length>0&&(Xe(u.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+m+'".')),lg(u.children,t,g,m)),!(u.path==null&&!u.index)&&t.push({path:m,score:OE(m,u.index),routesMeta:g})};return r.forEach((u,d)=>{var h;if(u.path===""||!((h=u.path)!=null&&h.includes("?")))a(u,d);else for(let p of ug(u.path))a(u,d,p)}),t}function ug(r){let t=r.split("/");if(t.length===0)return[];let[s,...o]=t,a=s.endsWith("?"),u=s.replace(/\?$/,"");if(o.length===0)return a?[u,""]:[u];let d=ug(o.join("/")),h=[];return h.push(...d.map(p=>p===""?u:[u,p].join("/"))),a&&h.push(...d),h.map(p=>r.startsWith("/")&&p===""?"/":p)}function _E(r){r.sort((t,s)=>t.score!==s.score?s.score-t.score:NE(t.routesMeta.map(o=>o.childrenIndex),s.routesMeta.map(o=>o.childrenIndex)))}const kE=/^:[\w-]+$/,CE=3,bE=2,RE=1,TE=10,PE=-2,Gp=r=>r==="*";function OE(r,t){let s=r.split("/"),o=s.length;return s.some(Gp)&&(o+=PE),t&&(o+=bE),s.filter(a=>!Gp(a)).reduce((a,u)=>a+(kE.test(u)?CE:u===""?RE:TE),o)}function NE(r,t){return r.length===t.length&&r.slice(0,-1).every((o,a)=>o===t[a])?r[r.length-1]-t[t.length-1]:0}function AE(r,t,s){let{routesMeta:o}=r,a={},u="/",d=[];for(let h=0;h{let{paramName:C,isOptional:L}=g;if(C==="*"){let k=h[v]||"";d=u.slice(0,u.length-k.length).replace(/(.)\/+$/,"$1")}const F=h[v];return L&&!F?m[C]=void 0:m[C]=(F||"").replace(/%2F/g,"/"),m},{}),pathname:u,pathnameBase:d,pattern:r}}function IE(r,t,s){t===void 0&&(t=!1),s===void 0&&(s=!0),rd(r==="*"||!r.endsWith("*")||r.endsWith("/*"),'Route path "'+r+'" will be treated as if it were '+('"'+r.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+r.replace(/\*$/,"/*")+'".'));let o=[],a="^"+r.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(d,h,p)=>(o.push({paramName:h,isOptional:p!=null}),p?"/?([^\\/]+)?":"/([^\\/]+)"));return r.endsWith("*")?(o.push({paramName:"*"}),a+=r==="*"||r==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):s?a+="\\/*$":r!==""&&r!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),o]}function DE(r){try{return r.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return rd(!1,'The URL path "'+r+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),r}}function sd(r,t){if(t==="/")return r;if(!r.toLowerCase().startsWith(t.toLowerCase()))return null;let s=t.endsWith("/")?t.length-1:t.length,o=r.charAt(s);return o&&o!=="/"?null:r.slice(s)||"/"}const jE=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ME=r=>jE.test(r);function FE(r,t){t===void 0&&(t="/");let{pathname:s,search:o="",hash:a=""}=typeof r=="string"?Hs(r):r,u;if(s)if(ME(s))u=s;else{if(s.includes("//")){let d=s;s=fg(s),rd(!1,"Pathnames cannot have embedded double slashes - normalizing "+(d+" -> "+s))}s.startsWith("/")?u=Jp(s.substring(1),"/"):u=Jp(s,t)}else u=t;return{pathname:u,search:BE(o),hash:$E(a)}}function Jp(r,t){let s=t.replace(/\/+$/,"").split("/");return r.split("/").forEach(a=>{a===".."?s.length>1&&s.pop():a!=="."&&s.push(a)}),s.length>1?s.join("/"):"/"}function Yu(r,t,s,o){return"Cannot include a '"+r+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(o)+"]. Please separate it out to the ")+("`to."+s+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function UE(r){return r.filter((t,s)=>s===0||t.route.path&&t.route.path.length>0)}function cg(r,t){let s=UE(r);return t?s.map((o,a)=>a===s.length-1?o.pathname:o.pathnameBase):s.map(o=>o.pathnameBase)}function dg(r,t,s,o){o===void 0&&(o=!1);let a;typeof r=="string"?a=Hs(r):(a=Go({},r),Xe(!a.pathname||!a.pathname.includes("?"),Yu("?","pathname","search",a)),Xe(!a.pathname||!a.pathname.includes("#"),Yu("#","pathname","hash",a)),Xe(!a.search||!a.search.includes("#"),Yu("#","search","hash",a)));let u=r===""||a.pathname==="",d=u?"/":a.pathname,h;if(d==null)h=s;else{let v=t.length-1;if(!o&&d.startsWith("..")){let C=d.split("/");for(;C[0]==="..";)C.shift(),v-=1;a.pathname=C.join("/")}h=v>=0?t[v]:"/"}let p=FE(a,h),m=d&&d!=="/"&&d.endsWith("/"),g=(u||d===".")&&s.endsWith("/");return!p.pathname.endsWith("/")&&(m||g)&&(p.pathname+="/"),p}const fg=r=>r.replace(/\/\/+/g,"/"),yr=r=>fg(r.join("/")),zE=r=>r.replace(/\/+$/,"").replace(/^\/*/,"/"),BE=r=>!r||r==="?"?"":r.startsWith("?")?r:"?"+r,$E=r=>!r||r==="#"?"":r.startsWith("#")?r:"#"+r;function VE(r){return r!=null&&typeof r.status=="number"&&typeof r.statusText=="string"&&typeof r.internal=="boolean"&&"data"in r}const hg=["post","put","patch","delete"];new Set(hg);const HE=["get",...hg];new Set(HE);/** * React Router v6.30.4 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function Jo(){return Jo=Object.assign?Object.assign.bind():function(r){for(var t=1;t{h.current=!0}),_.useCallback(function(m,g){if(g===void 0&&(g={}),!h.current)return;if(typeof m=="number"){o.go(m);return}let v=dg(m,JSON.parse(d),u,g.relative==="path");r==null&&t!=="/"&&(v.pathname=v.pathname==="/"?t:yr([t,v.pathname])),(g.replace?o.replace:o.push)(v,g.state,g)},[t,o,d,u,r])}function yg(r,t){let{relative:s}=t===void 0?{}:t,{future:o}=_.useContext(ts),{matches:a}=_.useContext(ns),{pathname:u}=qs(),d=JSON.stringify(cg(a,o.v7_relativeSplatPath));return _.useMemo(()=>dg(r,JSON.parse(d),u,s==="path"),[r,d,u,s])}function JE(r,t){return XE(r,t)}function XE(r,t,s,o){ii()||Xe(!1);let{navigator:a}=_.useContext(ts),{matches:u}=_.useContext(ns),d=u[u.length-1],h=d?d.params:{};d&&d.pathname;let p=d?d.pathnameBase:"/";d&&d.route;let m=qs(),g;if(t){var v;let w=typeof t=="string"?Hs(t):t;p==="/"||(v=w.pathname)!=null&&v.startsWith(p)||Xe(!1),g=w}else g=m;let C=g.pathname||"/",L=C;if(p!=="/"){let w=p.replace(/^\//,"").split("/");L="/"+C.replace(/^\//,"").split("/").slice(w.length).join("/")}let F=SE(r,{pathname:L}),k=n_(F&&F.map(w=>Object.assign({},w,{params:Object.assign({},h,w.params),pathname:yr([p,a.encodeLocation?a.encodeLocation(w.pathname).pathname:w.pathname]),pathnameBase:w.pathnameBase==="/"?p:yr([p,a.encodeLocation?a.encodeLocation(w.pathnameBase).pathname:w.pathnameBase])})),u,s,o);return t&&k?_.createElement(oi.Provider,{value:{location:Jo({pathname:"/",search:"",hash:"",state:null,key:"default"},g),navigationType:pr.Pop}},k):k}function YE(){let r=i_(),t=VE(r)?r.status+" "+r.statusText:r instanceof Error?r.message:JSON.stringify(r),s=r instanceof Error?r.stack:null,a={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return _.createElement(_.Fragment,null,_.createElement("h2",null,"Unexpected Application Error!"),_.createElement("h3",{style:{fontStyle:"italic"}},t),s?_.createElement("pre",{style:a},s):null,null)}const ZE=_.createElement(YE,null);class e_ extends _.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,s){return s.location!==t.location||s.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:s.error,location:s.location,revalidation:t.revalidation||s.revalidation}}componentDidCatch(t,s){console.error("React Router caught the following error during render",t,s)}render(){return this.state.error!==void 0?_.createElement(ns.Provider,{value:this.props.routeContext},_.createElement(pg.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function t_(r){let{routeContext:t,match:s,children:o}=r,a=_.useContext(od);return a&&a.static&&a.staticContext&&(s.route.errorElement||s.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=s.route.id),_.createElement(ns.Provider,{value:t},o)}function n_(r,t,s,o){var a;if(t===void 0&&(t=[]),s===void 0&&(s=null),o===void 0&&(o=null),r==null){var u;if(!s)return null;if(s.errors)r=s.matches;else if((u=o)!=null&&u.v7_partialHydration&&t.length===0&&!s.initialized&&s.matches.length>0)r=s.matches;else return null}let d=r,h=(a=s)==null?void 0:a.errors;if(h!=null){let g=d.findIndex(v=>v.route.id&&(h==null?void 0:h[v.route.id])!==void 0);g>=0||Xe(!1),d=d.slice(0,Math.min(d.length,g+1))}let p=!1,m=-1;if(s&&o&&o.v7_partialHydration)for(let g=0;g=0?d=d.slice(0,m+1):d=[d[0]];break}}}return d.reduceRight((g,v,C)=>{let L,F=!1,k=null,w=null;s&&(L=h&&v.route.id?h[v.route.id]:void 0,k=v.route.errorElement||ZE,p&&(m<0&&C===0?(l_("route-fallback"),F=!0,w=null):m===C&&(F=!0,w=v.route.hydrateFallbackElement||null)));let S=t.concat(d.slice(0,C+1)),I=()=>{let P;return L?P=k:F?P=w:v.route.Component?P=_.createElement(v.route.Component,null):v.route.element?P=v.route.element:P=g,_.createElement(t_,{match:v,routeContext:{outlet:g,matches:S,isDataRoute:s!=null},children:P})};return s&&(v.route.ErrorBoundary||v.route.errorElement||C===0)?_.createElement(e_,{location:s.location,revalidation:s.revalidation,component:k,error:L,children:I(),routeContext:{outlet:null,matches:S,isDataRoute:!0}}):I()},null)}var gg=(function(r){return r.UseBlocker="useBlocker",r.UseRevalidator="useRevalidator",r.UseNavigateStable="useNavigate",r})(gg||{}),vg=(function(r){return r.UseBlocker="useBlocker",r.UseLoaderData="useLoaderData",r.UseActionData="useActionData",r.UseRouteError="useRouteError",r.UseNavigation="useNavigation",r.UseRouteLoaderData="useRouteLoaderData",r.UseMatches="useMatches",r.UseRevalidator="useRevalidator",r.UseNavigateStable="useNavigate",r.UseRouteId="useRouteId",r})(vg||{});function r_(r){let t=_.useContext(od);return t||Xe(!1),t}function s_(r){let t=_.useContext(qE);return t||Xe(!1),t}function o_(r){let t=_.useContext(ns);return t||Xe(!1),t}function wg(r){let t=o_(),s=t.matches[t.matches.length-1];return s.route.id||Xe(!1),s.route.id}function i_(){var r;let t=_.useContext(pg),s=s_(),o=wg();return t!==void 0?t:(r=s.errors)==null?void 0:r[o]}function a_(){let{router:r}=r_(gg.UseNavigateStable),t=wg(vg.UseNavigateStable),s=_.useRef(!1);return mg(()=>{s.current=!0}),_.useCallback(function(a,u){u===void 0&&(u={}),s.current&&(typeof a=="number"?r.navigate(a):r.navigate(a,Jo({fromRouteId:t},u)))},[r,t])}const Xp={};function l_(r,t,s){Xp[r]||(Xp[r]=!0)}function u_(r,t){r==null||r.v7_startTransition,r==null||r.v7_relativeSplatPath}function Aa(r){Xe(!1)}function c_(r){let{basename:t="/",children:s=null,location:o,navigationType:a=pr.Pop,navigator:u,static:d=!1,future:h}=r;ii()&&Xe(!1);let p=t.replace(/^\/*/,"/"),m=_.useMemo(()=>({basename:p,navigator:u,static:d,future:Jo({v7_relativeSplatPath:!1},h)}),[p,h,u,d]);typeof o=="string"&&(o=Hs(o));let{pathname:g="/",search:v="",hash:C="",state:L=null,key:F="default"}=o,k=_.useMemo(()=>{let w=sd(g,p);return w==null?null:{location:{pathname:w,search:v,hash:C,state:L,key:F},navigationType:a}},[p,g,v,C,L,F,a]);return k==null?null:_.createElement(ts.Provider,{value:m},_.createElement(oi.Provider,{children:s,value:k}))}function d_(r){let{children:t,location:s}=r;return JE(Oc(t),s)}new Promise(()=>{});function Oc(r,t){t===void 0&&(t=[]);let s=[];return _.Children.forEach(r,(o,a)=>{if(!_.isValidElement(o))return;let u=[...t,a];if(o.type===_.Fragment){s.push.apply(s,Oc(o.props.children,u));return}o.type!==Aa&&Xe(!1),!o.props.index||!o.props.children||Xe(!1);let d={id:o.props.id||u.join("-"),caseSensitive:o.props.caseSensitive,element:o.props.element,Component:o.props.Component,index:o.props.index,path:o.props.path,loader:o.props.loader,action:o.props.action,errorElement:o.props.errorElement,ErrorBoundary:o.props.ErrorBoundary,hasErrorBoundary:o.props.ErrorBoundary!=null||o.props.errorElement!=null,shouldRevalidate:o.props.shouldRevalidate,handle:o.props.handle,lazy:o.props.lazy};o.props.children&&(d.children=Oc(o.props.children,u)),s.push(d)}),s}/** * React Router DOM v6.30.4 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function Nc(){return Nc=Object.assign?Object.assign.bind():function(r){for(var t=1;t{m&&Yp?Yp(()=>p(v)):p(v)},[p,m]);return _.useLayoutEffect(()=>d.listen(g),[d,g]),_.useEffect(()=>u_(o),[o]),_.createElement(c_,{basename:t,children:s,location:h.location,navigationType:h.action,navigator:d,future:o})}const w_=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",x_=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,id=_.forwardRef(function(t,s){let{onClick:o,relative:a,reloadDocument:u,replace:d,state:h,target:p,to:m,preventScrollReset:g,viewTransition:v}=t,C=f_(t,m_),{basename:L}=_.useContext(ts),F,k=!1;if(typeof m=="string"&&x_.test(m)&&(F=m,w_))try{let P=new URL(window.location.href),A=m.startsWith("//")?new URL(P.protocol+m):new URL(m),V=sd(A.pathname,L);A.origin===P.origin&&V!=null?m=V+A.search+A.hash:k=!0}catch{}let w=WE(m,{relative:a}),S=S_(m,{replace:d,state:h,target:p,preventScrollReset:g,relative:a,viewTransition:v});function I(P){o&&o(P),P.defaultPrevented||S(P)}return _.createElement("a",Nc({},C,{href:F||w,onClick:k||u?o:I,ref:s,target:p}))});var Zp;(function(r){r.UseScrollRestoration="useScrollRestoration",r.UseSubmit="useSubmit",r.UseSubmitFetcher="useSubmitFetcher",r.UseFetcher="useFetcher",r.useViewTransitionState="useViewTransitionState"})(Zp||(Zp={}));var em;(function(r){r.UseFetcher="useFetcher",r.UseFetchers="useFetchers",r.UseScrollRestoration="useScrollRestoration"})(em||(em={}));function S_(r,t){let{target:s,replace:o,state:a,preventScrollReset:u,relative:d,viewTransition:h}=t===void 0?{}:t,p=KE(),m=qs(),g=yg(r,{relative:d});return _.useCallback(v=>{if(p_(v,s)){v.preventDefault();let C=o!==void 0?o:$a(m)===$a(g);p(r,{replace:C,state:a,preventScrollReset:u,relative:d,viewTransition:h})}},[m,p,g,o,a,s,r,u,d,h])}function xg(r,t){return function(){return r.apply(t,arguments)}}const{toString:E_}=Object.prototype,{getPrototypeOf:Bs}=Object,{iterator:ai,toStringTag:Sg}=Symbol,Va=(({hasOwnProperty:r})=>(t,s)=>r.call(t,s))(Object.prototype),Xo=(r,t)=>{let s=r;const o=[];for(;s!=null&&s!==Object.prototype;){if(o.indexOf(s)!==-1)return!1;if(o.push(s),Va(s,t))return!0;s=Bs(s)}return!1},__=(r,t)=>r!=null&&Xo(r,t)?r[t]:void 0,ad=(r=>t=>{const s=E_.call(t);return r[s]||(r[s]=s.slice(8,-1).toLowerCase())})(Object.create(null)),un=r=>(r=r.toLowerCase(),t=>ad(t)===r),Qa=r=>t=>typeof t===r,{isArray:Yr}=Array,$s=Qa("undefined");function Ws(r){return r!==null&&!$s(r)&&r.constructor!==null&&!$s(r.constructor)&&Nt(r.constructor.isBuffer)&&r.constructor.isBuffer(r)}const Eg=un("ArrayBuffer");function k_(r){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(r):t=r&&r.buffer&&Eg(r.buffer),t}const C_=Qa("string"),Nt=Qa("function"),_g=Qa("number"),Qs=r=>r!==null&&typeof r=="object",b_=r=>r===!0||r===!1,La=r=>{if(!Qs(r))return!1;const t=Bs(r);return(t===null||t===Object.prototype||Bs(t)===null)&&!Xo(r,Sg)&&!Xo(r,ai)},R_=r=>{if(!Qs(r)||Ws(r))return!1;try{return Object.keys(r).length===0&&Object.getPrototypeOf(r)===Object.prototype}catch{return!1}},T_=un("Date"),P_=un("File"),O_=r=>!!(r&&typeof r.uri<"u"),N_=r=>r&&typeof r.getParts<"u",A_=un("Blob"),L_=un("FileList"),I_=r=>Qs(r)&&Nt(r.pipe);function D_(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const tm=D_(),nm=typeof tm.FormData<"u"?tm.FormData:void 0,j_=r=>{if(!r)return!1;if(nm&&r instanceof nm)return!0;const t=Bs(r);if(!t||t===Object.prototype||!Nt(r.append))return!1;const s=ad(r);return s==="formdata"||s==="object"&&Nt(r.toString)&&r.toString()==="[object FormData]"},M_=un("URLSearchParams"),[F_,U_,z_,B_]=["ReadableStream","Request","Response","Headers"].map(un),$_=r=>r.trim?r.trim():r.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function li(r,t,{allOwnKeys:s=!1}={}){if(r===null||typeof r>"u")return;let o,a;if(typeof r!="object"&&(r=[r]),Yr(r))for(o=0,a=r.length;o0;)if(a=s[o],t===a.toLowerCase())return a;return null}const Mr=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Cg=r=>!$s(r)&&r!==Mr;function Ac(...r){const{caseless:t,skipUndefined:s}=Cg(this)&&this||{},o={},a=(u,d)=>{if(d==="__proto__"||d==="constructor"||d==="prototype")return;const h=t&&typeof d=="string"&&kg(o,d)||d,p=Va(o,h)?o[h]:void 0;La(p)&&La(u)?o[h]=Ac(p,u):La(u)?o[h]=Ac({},u):Yr(u)?o[h]=u.slice():(!s||!$s(u))&&(o[h]=u)};for(let u=0,d=r.length;u(li(t,(a,u)=>{s&&Nt(a)?Object.defineProperty(r,u,{__proto__:null,value:xg(a,s),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(r,u,{__proto__:null,value:a,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:o}),r),H_=r=>(r.charCodeAt(0)===65279&&(r=r.slice(1)),r),q_=(r,t,s,o)=>{r.prototype=Object.create(t.prototype,o),Object.defineProperty(r.prototype,"constructor",{__proto__:null,value:r,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(r,"super",{__proto__:null,value:t.prototype}),s&&Object.assign(r.prototype,s)},W_=(r,t,s,o)=>{let a,u,d;const h={};if(t=t||{},r==null)return t;do{for(a=Object.getOwnPropertyNames(r),u=a.length;u-- >0;)d=a[u],(!o||o(d,r,t))&&!h[d]&&(t[d]=r[d],h[d]=!0);r=s!==!1&&Bs(r)}while(r&&(!s||s(r,t))&&r!==Object.prototype);return t},Q_=(r,t,s)=>{r=String(r),(s===void 0||s>r.length)&&(s=r.length),s-=t.length;const o=r.indexOf(t,s);return o!==-1&&o===s},K_=r=>{if(!r)return null;if(Yr(r))return r;let t=r.length;if(!_g(t))return null;const s=new Array(t);for(;t-- >0;)s[t]=r[t];return s},G_=(r=>t=>r&&t instanceof r)(typeof Uint8Array<"u"&&Bs(Uint8Array)),J_=(r,t)=>{const o=(r&&r[ai]).call(r);let a;for(;(a=o.next())&&!a.done;){const u=a.value;t.call(r,u[0],u[1])}},X_=(r,t)=>{let s;const o=[];for(;(s=r.exec(t))!==null;)o.push(s);return o},Y_=un("HTMLFormElement"),Z_=r=>r.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(s,o,a){return o.toUpperCase()+a}),{propertyIsEnumerable:e1}=Object.prototype,t1=un("RegExp"),bg=(r,t)=>{const s=Object.getOwnPropertyDescriptors(r),o={};li(s,(a,u)=>{let d;(d=t(a,u,r))!==!1&&(o[u]=d||a)}),Object.defineProperties(r,o)},n1=r=>{bg(r,(t,s)=>{if(Nt(r)&&["arguments","caller","callee"].includes(s))return!1;const o=r[s];if(Nt(o)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+s+"'")})}})},r1=(r,t)=>{const s={},o=a=>{a.forEach(u=>{s[u]=!0})};return Yr(r)?o(r):o(String(r).split(t)),s},s1=()=>{},o1=(r,t)=>r!=null&&Number.isFinite(r=+r)?r:t;function i1(r){return!!(r&&Nt(r.append)&&r[Sg]==="FormData"&&r[ai])}const a1=r=>{const t=new WeakSet,s=o=>{if(Qs(o)){if(t.has(o))return;if(Ws(o))return o;if(!("toJSON"in o)){t.add(o);const a=Yr(o)?[]:{};return li(o,(u,d)=>{const h=s(u);!$s(h)&&(a[d]=h)}),t.delete(o),a}}return o};return s(r)},l1=un("AsyncFunction"),u1=r=>r&&(Qs(r)||Nt(r))&&Nt(r.then)&&Nt(r.catch),Rg=((r,t)=>r?setImmediate:t?((s,o)=>(Mr.addEventListener("message",({source:a,data:u})=>{a===Mr&&u===s&&o.length&&o.shift()()},!1),a=>{o.push(a),Mr.postMessage(s,"*")}))(`axios@${Math.random()}`,[]):s=>setTimeout(s))(typeof setImmediate=="function",Nt(Mr.postMessage)),c1=typeof queueMicrotask<"u"?queueMicrotask.bind(Mr):typeof process<"u"&&process.nextTick||Rg,Tg=r=>r!=null&&Nt(r[ai]),d1=r=>r!=null&&Xo(r,ai)&&Tg(r),N={isArray:Yr,isArrayBuffer:Eg,isBuffer:Ws,isFormData:j_,isArrayBufferView:k_,isString:C_,isNumber:_g,isBoolean:b_,isObject:Qs,isPlainObject:La,isEmptyObject:R_,isReadableStream:F_,isRequest:U_,isResponse:z_,isHeaders:B_,isUndefined:$s,isDate:T_,isFile:P_,isReactNativeBlob:O_,isReactNative:N_,isBlob:A_,isRegExp:t1,isFunction:Nt,isStream:I_,isURLSearchParams:M_,isTypedArray:G_,isFileList:L_,forEach:li,merge:Ac,extend:V_,trim:$_,stripBOM:H_,inherits:q_,toFlatObject:W_,kindOf:ad,kindOfTest:un,endsWith:Q_,toArray:K_,forEachEntry:J_,matchAll:X_,isHTMLForm:Y_,hasOwnProperty:Va,hasOwnProp:Va,hasOwnInPrototypeChain:Xo,getSafeProp:__,reduceDescriptors:bg,freezeMethods:n1,toObjectSet:r1,toCamelCase:Z_,noop:s1,toFiniteNumber:o1,findKey:kg,global:Mr,isContextDefined:Cg,isSpecCompliantForm:i1,toJSONObject:a1,isAsyncFn:l1,isThenable:u1,setImmediate:Rg,asap:c1,isIterable:Tg,isSafeIterable:d1},f1=N.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),h1=r=>{const t={};let s,o,a;return r&&r.split(` `).forEach(function(d){a=d.indexOf(":"),s=d.substring(0,a).trim().toLowerCase(),o=d.substring(a+1).trim(),!(!s||t[s]&&f1[s])&&(s==="set-cookie"?t[s]?t[s].push(o):t[s]=[o]:t[s]=t[s]?t[s]+", "+o:o)}),t};function p1(r){let t=0,s=r.length;for(;tt;){const o=r.charCodeAt(s-1);if(o!==9&&o!==32)break;s-=1}return t===0&&s===r.length?r:r.slice(t,s)}const m1=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),y1=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function ld(r,t){return N.isArray(r)?r.map(s=>ld(s,t)):p1(String(r).replace(t,""))}const g1=r=>ld(r,m1),v1=r=>ld(r,y1);function Pg(r){const t=Object.create(null);return N.forEach(r.toJSON(),(s,o)=>{t[o]=v1(s)}),t}const rm=Symbol("internals");function jo(r){return r&&String(r).trim().toLowerCase()}function Ia(r){return r===!1||r==null?r:N.isArray(r)?r.map(Ia):g1(String(r))}function w1(r){const t=Object.create(null),s=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let o;for(;o=s.exec(r);)t[o[1]]=o[2];return t}const x1=r=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(r.trim());function Zu(r,t,s,o,a){if(N.isFunction(o))return o.call(this,t,s);if(a&&(t=s),!!N.isString(t)){if(N.isString(o))return t.indexOf(o)!==-1;if(N.isRegExp(o))return o.test(t)}}function S1(r){return r.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,s,o)=>s.toUpperCase()+o)}function E1(r,t){const s=N.toCamelCase(" "+t);["get","set","has"].forEach(o=>{Object.defineProperty(r,o+s,{__proto__:null,value:function(a,u,d){return this[o].call(this,t,a,u,d)},configurable:!0})})}let wt=class{constructor(t){t&&this.set(t)}set(t,s,o){const a=this;function u(h,p,m){const g=jo(p);if(!g)return;const v=N.findKey(a,g);(!v||a[v]===void 0||m===!0||m===void 0&&a[v]!==!1)&&(a[v||p]=Ia(h))}const d=(h,p)=>N.forEach(h,(m,g)=>u(m,g,p));if(N.isPlainObject(t)||t instanceof this.constructor)d(t,s);else if(N.isString(t)&&(t=t.trim())&&!x1(t))d(h1(t),s);else if(N.isObject(t)&&N.isSafeIterable(t)){let h=Object.create(null),p,m;for(const g of t){if(!N.isArray(g))throw new TypeError("Object iterator must return a key-value pair");m=g[0],N.hasOwnProp(h,m)?(p=h[m],h[m]=N.isArray(p)?[...p,g[1]]:[p,g[1]]):h[m]=g[1]}d(h,s)}else t!=null&&u(s,t,o);return this}get(t,s){if(t=jo(t),t){const o=N.findKey(this,t);if(o){const a=this[o];if(!s)return a;if(s===!0)return w1(a);if(N.isFunction(s))return s.call(this,a,o);if(N.isRegExp(s))return s.exec(a);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,s){if(t=jo(t),t){const o=N.findKey(this,t);return!!(o&&this[o]!==void 0&&(!s||Zu(this,this[o],o,s)))}return!1}delete(t,s){const o=this;let a=!1;function u(d){if(d=jo(d),d){const h=N.findKey(o,d);h&&(!s||Zu(o,o[h],h,s))&&(delete o[h],a=!0)}}return N.isArray(t)?t.forEach(u):u(t),a}clear(t){const s=Object.keys(this);let o=s.length,a=!1;for(;o--;){const u=s[o];(!t||Zu(this,this[u],u,t,!0))&&(delete this[u],a=!0)}return a}normalize(t){const s=this,o={};return N.forEach(this,(a,u)=>{const d=N.findKey(o,u);if(d){s[d]=Ia(a),delete s[u];return}const h=t?S1(u):String(u).trim();h!==u&&delete s[u],s[h]=Ia(a),o[h]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const s=Object.create(null);return N.forEach(this,(o,a)=>{o!=null&&o!==!1&&(s[a]=t&&N.isArray(o)?o.join(", "):o)}),s}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,s])=>t+": "+s).join(` `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...s){const o=new this(t);return s.forEach(a=>o.set(a)),o}static accessor(t){const o=(this[rm]=this[rm]={accessors:{}}).accessors,a=this.prototype;function u(d){const h=jo(d);o[h]||(E1(a,d),o[h]=!0)}return N.isArray(t)?t.forEach(u):u(t),this}};wt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);N.reduceDescriptors(wt.prototype,({value:r},t)=>{let s=t[0].toUpperCase()+t.slice(1);return{get:()=>r,set(o){this[s]=o}}});N.freezeMethods(wt);const _1="[REDACTED ****]";function k1(r){if(N.hasOwnProp(r,"toJSON"))return!0;let t=Object.getPrototypeOf(r);for(;t&&t!==Object.prototype;){if(N.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function C1(r,t){const s=new Set(t.map(u=>String(u).toLowerCase())),o=[],a=u=>{if(u===null||typeof u!="object"||N.isBuffer(u))return u;if(o.indexOf(u)!==-1)return;u instanceof wt&&(u=u.toJSON()),o.push(u);let d;if(N.isArray(u))d=[],u.forEach((h,p)=>{const m=a(h);N.isUndefined(m)||(d[p]=m)});else{if(!N.isPlainObject(u)&&k1(u))return o.pop(),u;d=Object.create(null);for(const[h,p]of Object.entries(u)){const m=s.has(h.toLowerCase())?_1:a(p);N.isUndefined(m)||(d[h]=m)}}return o.pop(),d};return a(r)}let X=class Og extends Error{static from(t,s,o,a,u,d){const h=new Og(t.message,s||t.code,o,a,u);return Object.defineProperty(h,"cause",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),h.name=t.name,t.status!=null&&h.status==null&&(h.status=t.status),d&&Object.assign(h,d),h}constructor(t,s,o,a,u){super(t),Object.defineProperty(this,"message",{__proto__:null,value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,s&&(this.code=s),o&&(this.config=o),a&&(this.request=a),u&&(this.response=u,this.status=u.status)}toJSON(){const t=this.config,s=t&&N.hasOwnProp(t,"redact")?t.redact:void 0,o=N.isArray(s)&&s.length>0?C1(t,s):N.toJSONObject(t);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:o,code:this.code,status:this.status}}};X.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";X.ERR_BAD_OPTION="ERR_BAD_OPTION";X.ECONNABORTED="ECONNABORTED";X.ETIMEDOUT="ETIMEDOUT";X.ECONNREFUSED="ECONNREFUSED";X.ERR_NETWORK="ERR_NETWORK";X.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";X.ERR_DEPRECATED="ERR_DEPRECATED";X.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";X.ERR_BAD_REQUEST="ERR_BAD_REQUEST";X.ERR_CANCELED="ERR_CANCELED";X.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";X.ERR_INVALID_URL="ERR_INVALID_URL";X.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const b1=null,Ng=100;function Lc(r){return N.isPlainObject(r)||N.isArray(r)}function Ag(r){return N.endsWith(r,"[]")?r.slice(0,-2):r}function ec(r,t,s){return r?r.concat(t).map(function(a,u){return a=Ag(a),!s&&u?"["+a+"]":a}).join(s?".":""):t}function R1(r){return N.isArray(r)&&!r.some(Lc)}const T1=N.toFlatObject(N,{},null,function(t){return/^is[A-Z]/.test(t)});function Ka(r,t,s){if(!N.isObject(r))throw new TypeError("target must be an object");t=t||new FormData,s=N.toFlatObject(s,{metaTokens:!0,dots:!1,indexes:!1},!1,function(I,P){return!N.isUndefined(P[I])});const o=s.metaTokens,a=s.visitor||F,u=s.dots,d=s.indexes,h=s.Blob||typeof Blob<"u"&&Blob,p=s.maxDepth===void 0?Ng:s.maxDepth,m=h&&N.isSpecCompliantForm(t),g=[];if(!N.isFunction(a))throw new TypeError("visitor must be a function");function v(S){if(S===null)return"";if(N.isDate(S))return S.toISOString();if(N.isBoolean(S))return S.toString();if(!m&&N.isBlob(S))throw new X("Blob is not supported. Use a Buffer instead.");if(N.isArrayBuffer(S)||N.isTypedArray(S)){if(m&&typeof h=="function")return new h([S]);if(typeof Buffer<"u")return Buffer.from(S);throw new X("Blob is not supported. Use a Buffer instead.",X.ERR_NOT_SUPPORT)}return S}function C(S){if(S>p)throw new X("Object is too deeply nested ("+S+" levels). Max depth: "+p,X.ERR_FORM_DATA_DEPTH_EXCEEDED)}function L(S,I){if(p===1/0)return JSON.stringify(S);const P=[];return JSON.stringify(S,function(V,$){if(!N.isObject($))return $;for(;P.length&&P[P.length-1]!==this;)P.pop();return P.push($),C(I+P.length-1),$})}function F(S,I,P){let A=S;if(N.isReactNative(t)&&N.isReactNativeBlob(S))return t.append(ec(P,I,u),v(S)),!1;if(S&&!P&&typeof S=="object"){if(N.endsWith(I,"{}"))I=o?I:I.slice(0,-2),S=L(S,1);else if(N.isArray(S)&&R1(S)||(N.isFileList(S)||N.endsWith(I,"[]"))&&(A=N.toArray(S)))return I=Ag(I),A.forEach(function($,G){!(N.isUndefined($)||$===null)&&t.append(d===!0?ec([I],G,u):d===null?I:I+"[]",v($))}),!1}return Lc(S)?!0:(t.append(ec(P,I,u),v(S)),!1)}const k=Object.assign(T1,{defaultVisitor:F,convertValue:v,isVisitable:Lc});function w(S,I,P=0){if(!N.isUndefined(S)){if(C(P),g.indexOf(S)!==-1)throw new Error("Circular reference detected in "+I.join("."));g.push(S),N.forEach(S,function(V,$){(!(N.isUndefined(V)||V===null)&&a.call(t,V,N.isString($)?$.trim():$,I,k))===!0&&w(V,I?I.concat($):[$],P+1)}),g.pop()}}if(!N.isObject(r))throw new TypeError("data must be an object");return w(r),t}function sm(r){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(r).replace(/[!'()~]|%20/g,function(o){return t[o]})}function ud(r,t){this._pairs=[],r&&Ka(r,this,t)}const Lg=ud.prototype;Lg.append=function(t,s){this._pairs.push([t,s])};Lg.toString=function(t){const s=t?o=>t.call(this,o,sm):sm;return this._pairs.map(function(a){return s(a[0])+"="+s(a[1])},"").join("&")};function P1(r){return encodeURIComponent(r).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Ig(r,t,s){if(!t)return r;r=r||"";const o=N.isFunction(s)?{serialize:s}:s,a=N.getSafeProp(o,"encode")||P1,u=N.getSafeProp(o,"serialize");let d;if(u?d=u(t,o):d=N.isURLSearchParams(t)?t.toString():new ud(t,o).toString(a),d){const h=r.indexOf("#");h!==-1&&(r=r.slice(0,h)),r+=(r.indexOf("?")===-1?"?":"&")+d}return r}class om{constructor(){this.handlers=[]}use(t,s,o){return this.handlers.push({fulfilled:t,rejected:s,synchronous:o?o.synchronous:!1,runWhen:o?o.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){N.forEach(this.handlers,function(o){o!==null&&t(o)})}}const cd={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},O1=typeof URLSearchParams<"u"?URLSearchParams:ud,N1=typeof FormData<"u"?FormData:null,A1=typeof Blob<"u"?Blob:null,L1={isBrowser:!0,classes:{URLSearchParams:O1,FormData:N1,Blob:A1},protocols:["http","https","file","blob","url","data"]},dd=typeof window<"u"&&typeof document<"u",Ic=typeof navigator=="object"&&navigator||void 0,I1=dd&&(!Ic||["ReactNative","NativeScript","NS"].indexOf(Ic.product)<0),D1=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",j1=dd&&window.location.href||"http://localhost",M1=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:dd,hasStandardBrowserEnv:I1,hasStandardBrowserWebWorkerEnv:D1,navigator:Ic,origin:j1},Symbol.toStringTag,{value:"Module"})),ft={...M1,...L1};function F1(r,t){return Ka(r,new ft.classes.URLSearchParams,{visitor:function(s,o,a,u){return ft.isNode&&N.isBuffer(s)?(this.append(o,s.toString("base64")),!1):u.defaultVisitor.apply(this,arguments)},...t})}const im=Ng;function Dg(r){if(r>im)throw new X("FormData field is too deeply nested ("+r+" levels). Max depth: "+im,X.ERR_FORM_DATA_DEPTH_EXCEEDED)}function U1(r){const t=[],s=/\w+|\[(\w*)]/g;let o;for(;(o=s.exec(r))!==null;)Dg(t.length),t.push(o[0]==="[]"?"":o[1]||o[0]);return t}function z1(r){const t={},s=Object.keys(r);let o;const a=s.length;let u;for(o=0;o=s.length;return d=!d&&N.isArray(a)?a.length:d,p?(N.hasOwnProp(a,d)?a[d]=N.isArray(a[d])?a[d].concat(o):[a[d],o]:a[d]=o,!h):((!N.hasOwnProp(a,d)||!N.isObject(a[d]))&&(a[d]=[]),t(s,o,a[d],u)&&N.isArray(a[d])&&(a[d]=z1(a[d])),!h)}if(N.isFormData(r)&&N.isFunction(r.entries)){const s={};return N.forEachEntry(r,(o,a)=>{t(U1(o),a,s,0)}),s}return null}const Rs=(r,t)=>r!=null&&N.hasOwnProp(r,t)?r[t]:void 0;function B1(r,t,s){if(N.isString(r))try{return(t||JSON.parse)(r),N.trim(r)}catch(o){if(o.name!=="SyntaxError")throw o}return(s||JSON.stringify)(r)}const ui={transitional:cd,adapter:["xhr","http","fetch"],transformRequest:[function(t,s){const o=s.getContentType()||"",a=o.indexOf("application/json")>-1,u=N.isObject(t);if(u&&N.isHTMLForm(t)&&(t=new FormData(t)),N.isFormData(t))return a?JSON.stringify(jg(t)):t;if(N.isArrayBuffer(t)||N.isBuffer(t)||N.isStream(t)||N.isFile(t)||N.isBlob(t)||N.isReadableStream(t))return t;if(N.isArrayBufferView(t))return t.buffer;if(N.isURLSearchParams(t))return s.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let h;if(u){const p=Rs(this,"formSerializer");if(o.indexOf("application/x-www-form-urlencoded")>-1)return F1(t,p).toString();if((h=N.isFileList(t))||o.indexOf("multipart/form-data")>-1){const m=Rs(this,"env"),g=m&&m.FormData;return Ka(h?{"files[]":t}:t,g&&new g,p)}}return u||a?(s.setContentType("application/json",!1),B1(t)):t}],transformResponse:[function(t){const s=Rs(this,"transitional")||ui.transitional,o=s&&s.forcedJSONParsing,a=Rs(this,"responseType"),u=a==="json";if(N.isResponse(t)||N.isReadableStream(t))return t;if(t&&N.isString(t)&&(o&&!a||u)){const h=!(s&&s.silentJSONParsing)&&u;try{return JSON.parse(t,Rs(this,"parseReviver"))}catch(p){if(h)throw p.name==="SyntaxError"?X.from(p,X.ERR_BAD_RESPONSE,this,null,Rs(this,"response")):p}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ft.classes.FormData,Blob:ft.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};N.forEach(["delete","get","head","post","put","patch","query"],r=>{ui.headers[r]={}});function tc(r,t){const s=this||ui,o=t||s,a=wt.from(o.headers);let u=o.data;return N.forEach(r,function(h){u=h.call(s,u,a.normalize(),t?t.status:void 0)}),a.normalize(),u}function Mg(r){return!!(r&&r.__CANCEL__)}let ci=class extends X{constructor(t,s,o){super(t??"canceled",X.ERR_CANCELED,s,o),this.name="CanceledError",this.__CANCEL__=!0}};function Fg(r,t,s){const o=s.config.validateStatus;!s.status||!o||o(s.status)?r(s):t(new X("Request failed with status code "+s.status,s.status>=400&&s.status<500?X.ERR_BAD_REQUEST:X.ERR_BAD_RESPONSE,s.config,s.request,s))}function $1(r){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(r);return t&&t[1]||""}function V1(r,t){r=r||10;const s=new Array(r),o=new Array(r);let a=0,u=0,d;return t=t!==void 0?t:1e3,function(p){const m=Date.now(),g=o[u];d||(d=m),s[a]=p,o[a]=m;let v=u,C=0;for(;v!==a;)C+=s[v++],v=v%r;if(a=(a+1)%r,a===u&&(u=(u+1)%r),m-d{s=g,a=null,u&&(clearTimeout(u),u=null),r(...m)};return[(...m)=>{const g=Date.now(),v=g-s;v>=o?d(m,g):(a=m,u||(u=setTimeout(()=>{u=null,d(a)},o-v)))},()=>a&&d(a)]}const Ha=(r,t,s=3)=>{let o=0;const a=V1(50,250);return H1(u=>{if(!u||typeof u.loaded!="number")return;const d=u.loaded,h=u.lengthComputable?u.total:void 0,p=h!=null?Math.min(d,h):d,m=Math.max(0,p-o),g=a(m);o=Math.max(o,p);const v={loaded:p,total:h,progress:h?p/h:void 0,bytes:m,rate:g||void 0,estimated:g&&h?(h-p)/g:void 0,event:u,lengthComputable:h!=null,[t?"download":"upload"]:!0};r(v)},s)},am=(r,t)=>{const s=r!=null;return[o=>t[0]({lengthComputable:s,total:r,loaded:o}),t[1]]},lm=r=>(...t)=>N.asap(()=>r(...t)),q1=ft.hasStandardBrowserEnv?((r,t)=>s=>(s=new URL(s,ft.origin),r.protocol===s.protocol&&r.host===s.host&&(t||r.port===s.port)))(new URL(ft.origin),ft.navigator&&/(msie|trident)/i.test(ft.navigator.userAgent)):()=>!0,W1=ft.hasStandardBrowserEnv?{write(r,t,s,o,a,u,d){if(typeof document>"u")return;const h=[`${r}=${encodeURIComponent(t)}`];N.isNumber(s)&&h.push(`expires=${new Date(s).toUTCString()}`),N.isString(o)&&h.push(`path=${o}`),N.isString(a)&&h.push(`domain=${a}`),u===!0&&h.push("secure"),N.isString(d)&&h.push(`SameSite=${d}`),document.cookie=h.join("; ")},read(r){if(typeof document>"u")return null;const t=document.cookie.split(";");for(let s=0;sr instanceof wt?{...r}:r;function Zr(r,t){r=r||{},t=t||{};const s=Object.create(null);Object.defineProperty(s,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function o(g,v,C,L){return N.isPlainObject(g)&&N.isPlainObject(v)?N.merge.call({caseless:L},g,v):N.isPlainObject(v)?N.merge({},v):N.isArray(v)?v.slice():v}function a(g,v,C,L){if(N.isUndefined(v)){if(!N.isUndefined(g))return o(void 0,g,C,L)}else return o(g,v,C,L)}function u(g,v){if(!N.isUndefined(v))return o(void 0,v)}function d(g,v){if(N.isUndefined(v)){if(!N.isUndefined(g))return o(void 0,g)}else return o(void 0,v)}function h(g){const v=N.hasOwnProp(t,"transitional")?t.transitional:void 0;if(!N.isUndefined(v))if(N.isPlainObject(v)){if(N.hasOwnProp(v,g))return v[g]}else return;const C=N.hasOwnProp(r,"transitional")?r.transitional:void 0;if(N.isPlainObject(C)&&N.hasOwnProp(C,g))return C[g]}function p(g,v,C){if(N.hasOwnProp(t,C))return o(g,v);if(N.hasOwnProp(r,C))return o(void 0,g)}const m={url:u,method:u,data:u,baseURL:d,transformRequest:d,transformResponse:d,paramsSerializer:d,timeout:d,timeoutMessage:d,withCredentials:d,withXSRFToken:d,adapter:d,responseType:d,xsrfCookieName:d,xsrfHeaderName:d,onUploadProgress:d,onDownloadProgress:d,decompress:d,maxContentLength:d,maxBodyLength:d,beforeRedirect:d,transport:d,httpAgent:d,httpsAgent:d,cancelToken:d,socketPath:d,allowedSocketPaths:d,responseEncoding:d,validateStatus:p,headers:(g,v,C)=>a(cm(g),cm(v),C,!0)};return N.forEach(Object.keys({...r,...t}),function(v){if(v==="__proto__"||v==="constructor"||v==="prototype")return;const C=N.hasOwnProp(m,v)?m[v]:a,L=N.hasOwnProp(r,v)?r[v]:void 0,F=N.hasOwnProp(t,v)?t[v]:void 0,k=C(L,F,v);N.isUndefined(k)&&C!==p||(s[v]=k)}),N.hasOwnProp(t,"validateStatus")&&N.isUndefined(t.validateStatus)&&h("validateStatusUndefinedResolves")===!1&&(N.hasOwnProp(r,"validateStatus")?s.validateStatus=o(void 0,r.validateStatus):delete s.validateStatus),s}const Z1=["content-type","content-length"];function ek(r,t,s){if(s!=="content-only"){r.set(t);return}Object.entries(t||{}).forEach(([o,a])=>{Z1.includes(o.toLowerCase())&&r.set(o,a)})}const tk=r=>encodeURIComponent(r).replace(/%([0-9A-F]{2})/gi,(t,s)=>String.fromCharCode(parseInt(s,16)));function zg(r){const t=Zr({},r),s=C=>N.hasOwnProp(t,C)?t[C]:void 0,o=s("data");let a=s("withXSRFToken");const u=s("xsrfHeaderName"),d=s("xsrfCookieName");let h=s("headers");const p=s("auth"),m=s("baseURL"),g=s("allowAbsoluteUrls"),v=s("url");if(t.headers=h=wt.from(h),t.url=Ig(Ug(m,v,g,t),s("params"),s("paramsSerializer")),p){const C=N.getSafeProp(p,"username")||"",L=N.getSafeProp(p,"password")||"";try{h.set("Authorization","Basic "+btoa(C+":"+(L?tk(L):"")))}catch(F){throw X.from(F,X.ERR_BAD_OPTION_VALUE,r)}}if(N.isFormData(o)&&(ft.hasStandardBrowserEnv||ft.hasStandardBrowserWebWorkerEnv||N.isReactNative(o)?h.setContentType(void 0):N.isFunction(o.getHeaders)&&ek(h,o.getHeaders(),s("formDataHeaderPolicy"))),ft.hasStandardBrowserEnv&&(N.isFunction(a)&&(a=a(t)),a===!0||a==null&&q1(t.url))){const L=u&&d&&W1.read(d);L&&h.set(u,L)}return t}const nk=typeof XMLHttpRequest<"u",rk=nk&&function(r){return new Promise(function(s,o){const a=zg(r);let u=a.data;const d=wt.from(a.headers).normalize();let{responseType:h,onUploadProgress:p,onDownloadProgress:m}=a,g,v,C,L,F;function k(){L&&L(),F&&F(),a.cancelToken&&a.cancelToken.unsubscribe(g),a.signal&&a.signal.removeEventListener("abort",g)}let w=new XMLHttpRequest;w.open(a.method.toUpperCase(),a.url,!0),w.timeout=a.timeout;function S(){if(!w)return;const P=wt.from("getAllResponseHeaders"in w&&w.getAllResponseHeaders()),V={data:!h||h==="text"||h==="json"?w.responseText:w.response,status:w.status,statusText:w.statusText,headers:P,config:r,request:w};Fg(function(G){s(G),k()},function(G){o(G),k()},V),w=null}"onloadend"in w?w.onloadend=S:w.onreadystatechange=function(){!w||w.readyState!==4||w.status===0&&!(w.responseURL&&w.responseURL.startsWith("file:"))||setTimeout(S)},w.onabort=function(){w&&(o(new X("Request aborted",X.ECONNABORTED,r,w)),k(),w=null)},w.onerror=function(A){const V=A&&A.message?A.message:"Network Error",$=new X(V,X.ERR_NETWORK,r,w);$.event=A||null,o($),k(),w=null},w.ontimeout=function(){let A=a.timeout?"timeout of "+a.timeout+"ms exceeded":"timeout exceeded";const V=a.transitional||cd;a.timeoutErrorMessage&&(A=a.timeoutErrorMessage),o(new X(A,V.clarifyTimeoutError?X.ETIMEDOUT:X.ECONNABORTED,r,w)),k(),w=null},u===void 0&&d.setContentType(null),"setRequestHeader"in w&&N.forEach(Pg(d),function(A,V){w.setRequestHeader(V,A)}),N.isUndefined(a.withCredentials)||(w.withCredentials=!!a.withCredentials),h&&h!=="json"&&(w.responseType=a.responseType),m&&([C,F]=Ha(m,!0),w.addEventListener("progress",C)),p&&w.upload&&([v,L]=Ha(p),w.upload.addEventListener("progress",v),w.upload.addEventListener("loadend",L)),(a.cancelToken||a.signal)&&(g=P=>{w&&(o(!P||P.type?new ci(null,r,w):P),w.abort(),k(),w=null)},a.cancelToken&&a.cancelToken.subscribe(g),a.signal&&(a.signal.aborted?g():a.signal.addEventListener("abort",g)));const I=$1(a.url);if(I&&!ft.protocols.includes(I)){o(new X("Unsupported protocol "+I+":",X.ERR_BAD_REQUEST,r)),k();return}w.send(u||null)})},sk=(r,t)=>{if(r=r?r.filter(Boolean):[],!t&&!r.length)return;const s=new AbortController;let o=!1;const a=function(p){if(!o){o=!0,d();const m=p instanceof Error?p:this.reason;s.abort(m instanceof X?m:new ci(m instanceof Error?m.message:m))}};let u=t&&setTimeout(()=>{u=null,a(new X(`timeout of ${t}ms exceeded`,X.ETIMEDOUT))},t);const d=()=>{r&&(u&&clearTimeout(u),u=null,r.forEach(p=>{p.unsubscribe?p.unsubscribe(a):p.removeEventListener("abort",a)}),r=null)};r.forEach(p=>p.addEventListener("abort",a,{once:!0}));const{signal:h}=s;return h.unsubscribe=()=>N.asap(d),h},ok=function*(r,t){let s=r.byteLength;if(s{const a=ik(r,t);let u=0,d,h=p=>{d||(d=!0,o&&o(p))};return new ReadableStream({async pull(p){try{const{done:m,value:g}=await a.next();if(m){h(),p.close();return}let v=g.byteLength;if(s){let C=u+=v;s(C)}p.enqueue(new Uint8Array(g))}catch(m){throw h(m),m}},cancel(p){return h(p),a.return()}},{highWaterMark:2})},qa=r=>r>=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102,lk=(r,t,s)=>t+2L>=2&&o.charCodeAt(L-2)===37&&o.charCodeAt(L-1)===51&&(o.charCodeAt(L)===68||o.charCodeAt(L)===100);m>=0&&(o.charCodeAt(m)===61?(p++,m--):g(m)&&(p++,m-=3)),p===1&&m>=0&&(o.charCodeAt(m)===61||g(m))&&p++;const C=Math.floor(d/4)*3-(p||0);return C>0?C:0}let u=0;for(let d=0,h=o.length;d=55296&&p<=56319&&d+1=56320&&m<=57343?(u+=4,d++):u+=3}else u+=3}return u}const fd="1.18.1",fm=64*1024,{isFunction:ba}=N,ck=r=>encodeURIComponent(r).replace(/%([0-9A-F]{2})/gi,(t,s)=>String.fromCharCode(parseInt(s,16))),hm=r=>{if(!N.isString(r))return r;try{return decodeURIComponent(r)}catch{return r}},pm=(r,...t)=>{try{return!!r(...t)}catch{return!1}},dk=r=>{const t=r.indexOf("://");let s=r;return t!==-1&&(s=s.slice(t+3)),s.includes("@")||s.includes(":")},fk=r=>{const t=N.global!==void 0&&N.global!==null?N.global:globalThis,{ReadableStream:s,TextEncoder:o}=t;r=N.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},r);const{fetch:a,Request:u,Response:d}=r,h=a?ba(a):typeof fetch=="function",p=ba(u),m=ba(d);if(!h)return!1;const g=h&&ba(s),v=h&&(typeof o=="function"?(S=>I=>S.encode(I))(new o):async S=>new Uint8Array(await new u(S).arrayBuffer())),C=p&&g&&pm(()=>{let S=!1;const I=new u(ft.origin,{body:new s,method:"POST",get duplex(){return S=!0,"half"}}),P=I.headers.has("Content-Type");return I.body!=null&&I.body.cancel(),S&&!P}),L=m&&g&&pm(()=>N.isReadableStream(new d("").body)),F={stream:L&&(S=>S.body)};h&&["text","arrayBuffer","blob","formData","stream"].forEach(S=>{!F[S]&&(F[S]=(I,P)=>{let A=I&&I[S];if(A)return A.call(I);throw new X(`Response type '${S}' is not supported`,X.ERR_NOT_SUPPORT,P)})});const k=async S=>{if(S==null)return 0;if(N.isBlob(S))return S.size;if(N.isSpecCompliantForm(S))return(await new u(ft.origin,{method:"POST",body:S}).arrayBuffer()).byteLength;if(N.isArrayBufferView(S)||N.isArrayBuffer(S))return S.byteLength;if(N.isURLSearchParams(S)&&(S=S+""),N.isString(S))return(await v(S)).byteLength},w=async(S,I)=>{const P=N.toFiniteNumber(S.getContentLength());return P??k(I)};return async S=>{let{url:I,method:P,data:A,signal:V,cancelToken:$,timeout:G,onDownloadProgress:B,onUploadProgress:ie,responseType:ue,headers:Se,withCredentials:Te="same-origin",fetchOptions:xe,maxContentLength:Y,maxBodyLength:_e}=zg(S);const Ee=N.isNumber(Y)&&Y>-1,ke=N.isNumber(_e)&&_e>-1,K=J=>N.hasOwnProp(S,J)?S[J]:void 0;let ae=a||fetch;ue=ue?(ue+"").toLowerCase():"text";let U=sk([V,$&&$.toAbortSignal()],G),O=null;const z=U&&U.unsubscribe&&(()=>{U.unsubscribe()});let ce,me=null;const he=()=>new X("Request body larger than maxBodyLength limit",X.ERR_BAD_REQUEST,S,O);try{let J;const ve=K("auth");if(ve){const we=N.getSafeProp(ve,"username")||"",at=N.getSafeProp(ve,"password")||"";J={username:we,password:at}}if(dk(I)){const we=new URL(I,ft.origin);if(!J&&(we.username||we.password)){const at=hm(we.username),Jt=hm(we.password);J={username:at,password:Jt}}(we.username||we.password)&&(we.username="",we.password="",I=we.href)}if(J&&(Se.delete("authorization"),Se.set("Authorization","Basic "+btoa(ck((J.username||"")+":"+(J.password||""))))),Ee&&typeof I=="string"&&I.startsWith("data:")&&uk(I)>Y)throw new X("maxContentLength size of "+Y+" exceeded",X.ERR_BAD_RESPONSE,S,O);if(ke&&P!=="get"&&P!=="head"){const we=await k(A);if(typeof we=="number"&&isFinite(we)&&(ce=we,we>_e))throw he()}const Re=ke&&(N.isReadableStream(A)||N.isStream(A)),ge=(we,at,Jt)=>dm(we,fm,Xt=>{if(ke&&Xt>_e)throw me=he();at&&at(Xt)},Jt);if(C&&P!=="get"&&P!=="head"&&(ie||Re)){if(ce=ce??await w(Se,A),ce!==0||Re){let we=new u(I,{method:"POST",body:A,duplex:"half"}),at;if(N.isFormData(A)&&(at=we.headers.get("content-type"))&&Se.setContentType(at),we.body){const[Jt,Xt]=ie&&am(ce,Ha(lm(ie)))||[];A=ge(we.body,Jt,Xt)}}}else if(Re&&!p&&g&&P!=="get"&&P!=="head")A=ge(A);else if(Re&&p&&!C&&P!=="get"&&P!=="head")throw new X("Stream request bodies are not supported by the current fetch implementation",X.ERR_NOT_SUPPORT,S,O);N.isString(Te)||(Te=Te?"include":"omit");const tt=p&&"credentials"in u.prototype;if(N.isFormData(A)){const we=Se.getContentType();we&&/^multipart\/form-data/i.test(we)&&!/boundary=/i.test(we)&&Se.delete("content-type")}Se.set("User-Agent","axios/"+fd,!1);const Mt={...xe,signal:U,method:P.toUpperCase(),headers:Pg(Se.normalize()),body:A,duplex:"half",credentials:tt?Te:void 0};O=p&&new u(I,Mt);let it=await(p?ae(O,xe):ae(I,Mt));const Gt=wt.from(it.headers);if(Ee){const we=N.toFiniteNumber(Gt.getContentLength());if(we!=null&&we>Y)throw new X("maxContentLength size of "+Y+" exceeded",X.ERR_BAD_RESPONSE,S,O)}const Ft=L&&(ue==="stream"||ue==="response");if(L&&it.body&&(B||Ee||Ft&&z)){const we={};["status","statusText","headers"].forEach(Sn=>{we[Sn]=it[Sn]});const at=N.toFiniteNumber(Gt.getContentLength()),[Jt,Xt]=B&&am(at,Ha(lm(B),!0))||[];let Dn=0;const jn=Sn=>{if(Ee&&(Dn=Sn,Dn>Y))throw new X("maxContentLength size of "+Y+" exceeded",X.ERR_BAD_RESPONSE,S,O);Jt&&Jt(Sn)};it=new d(dm(it.body,fm,jn,()=>{Xt&&Xt(),z&&z()}),we)}ue=ue||"text";let Ut=await F[N.findKey(F,ue)||"text"](it,S);if(Ee&&!L&&!Ft){let we;if(Ut!=null&&(typeof Ut.byteLength=="number"?we=Ut.byteLength:typeof Ut.size=="number"?we=Ut.size:typeof Ut=="string"&&(we=typeof o=="function"?new o().encode(Ut).byteLength:Ut.length)),typeof we=="number"&&we>Y)throw new X("maxContentLength size of "+Y+" exceeded",X.ERR_BAD_RESPONSE,S,O)}return!Ft&&z&&z(),await new Promise((we,at)=>{Fg(we,at,{data:Ut,headers:wt.from(it.headers),status:it.status,statusText:it.statusText,config:S,request:O})})}catch(J){if(z&&z(),U&&U.aborted&&U.reason instanceof X){const ve=U.reason;throw ve.config=S,O&&(ve.request=O),J!==ve&&Object.defineProperty(ve,"cause",{__proto__:null,value:J,writable:!0,enumerable:!1,configurable:!0}),ve}if(me)throw O&&!me.request&&(me.request=O),me;if(J instanceof X)throw O&&!J.request&&(J.request=O),J;if(J&&J.name==="TypeError"&&/Load failed|fetch/i.test(J.message)){const ve=new X("Network Error",X.ERR_NETWORK,S,O,J&&J.response);throw Object.defineProperty(ve,"cause",{__proto__:null,value:J.cause||J,writable:!0,enumerable:!1,configurable:!0}),ve}throw X.from(J,J&&J.code,S,O,J&&J.response)}}},hk=new Map,Bg=r=>{let t=r&&r.env||{};const{fetch:s,Request:o,Response:a}=t,u=[o,a,s];let d=u.length,h=d,p,m,g=hk;for(;h--;)p=u[h],m=g.get(p),m===void 0&&g.set(p,m=h?new Map:fk(t)),g=m;return m};Bg();const hd={http:b1,xhr:rk,fetch:{get:Bg}};N.forEach(hd,(r,t)=>{if(r){try{Object.defineProperty(r,"name",{__proto__:null,value:t})}catch{}Object.defineProperty(r,"adapterName",{__proto__:null,value:t})}});const mm=r=>`- ${r}`,pk=r=>N.isFunction(r)||r===null||r===!1;function mk(r,t){r=N.isArray(r)?r:[r];const{length:s}=r;let o,a;const u={};for(let d=0;d`adapter ${p} `+(m===!1?"is not supported by the environment":"is not available in the build"));let h=s?d.length>1?`since : `+d.map(mm).join(` `):" "+mm(d[0]):"as no adapter specified";throw new X("There is no suitable adapter to dispatch the request "+h,X.ERR_NOT_SUPPORT)}return a}const $g={getAdapter:mk,adapters:hd};function nc(r){if(r.cancelToken&&r.cancelToken.throwIfRequested(),r.signal&&r.signal.aborted)throw new ci(null,r)}function ym(r){return nc(r),r.headers=wt.from(r.headers),r.data=tc.call(r,r.transformRequest),["post","put","patch"].indexOf(r.method)!==-1&&r.headers.setContentType("application/x-www-form-urlencoded",!1),$g.getAdapter(r.adapter||ui.adapter,r)(r).then(function(o){nc(r),r.response=o;try{o.data=tc.call(r,r.transformResponse,o)}finally{delete r.response}return o.headers=wt.from(o.headers),o},function(o){if(!Mg(o)&&(nc(r),o&&o.response)){r.response=o.response;try{o.response.data=tc.call(r,r.transformResponse,o.response)}finally{delete r.response}o.response.headers=wt.from(o.response.headers)}return Promise.reject(o)})}const Ga={};["object","boolean","number","function","string","symbol"].forEach((r,t)=>{Ga[r]=function(o){return typeof o===r||"a"+(t<1?"n ":" ")+r}});const gm={};Ga.transitional=function(t,s,o){function a(u,d){return"[Axios v"+fd+"] Transitional option '"+u+"'"+d+(o?". "+o:"")}return(u,d,h)=>{if(t===!1)throw new X(a(d," has been removed"+(s?" in "+s:"")),X.ERR_DEPRECATED);return s&&!gm[d]&&(gm[d]=!0,console.warn(a(d," has been deprecated since v"+s+" and will be removed in the near future"))),t?t(u,d,h):!0}};Ga.spelling=function(t){return(s,o)=>(console.warn(`${o} is likely a misspelling of ${t}`),!0)};function yk(r,t,s){if(typeof r!="object"||r===null)throw new X("options must be an object",X.ERR_BAD_OPTION_VALUE);const o=Object.keys(r);let a=o.length;for(;a-- >0;){const u=o[a],d=Object.prototype.hasOwnProperty.call(t,u)?t[u]:void 0;if(d){const h=r[u],p=h===void 0||d(h,u,r);if(p!==!0)throw new X("option "+u+" must be "+p,X.ERR_BAD_OPTION_VALUE);continue}if(s!==!0)throw new X("Unknown option "+u,X.ERR_BAD_OPTION)}}const Da={assertOptions:yk,validators:Ga},gt=Da.validators;let Qr=class{constructor(t){this.defaults=t||{},this.interceptors={request:new om,response:new om}}async request(t,s){try{return await this._request(t,s)}catch(o){if(o instanceof Error){let a={};Error.captureStackTrace?Error.captureStackTrace(a):a=new Error;const u=(()=>{if(!a.stack)return"";const d=a.stack.indexOf(` `);return d===-1?"":a.stack.slice(d+1)})();try{if(!o.stack)o.stack=u;else if(u){const d=u.indexOf(` `),h=d===-1?-1:u.indexOf(` `,d+1),p=h===-1?"":u.slice(h+1);String(o.stack).endsWith(p)||(o.stack+=` `+u)}}catch{}}throw o}}_request(t,s){typeof t=="string"?(s=s||{},s.url=t):s=t||{},s=Zr(this.defaults,s);const{transitional:o,paramsSerializer:a,headers:u}=s;o!==void 0&&Da.assertOptions(o,{silentJSONParsing:gt.transitional(gt.boolean),forcedJSONParsing:gt.transitional(gt.boolean),clarifyTimeoutError:gt.transitional(gt.boolean),legacyInterceptorReqResOrdering:gt.transitional(gt.boolean),advertiseZstdAcceptEncoding:gt.transitional(gt.boolean),validateStatusUndefinedResolves:gt.transitional(gt.boolean)},!1),a!=null&&(N.isFunction(a)?s.paramsSerializer={serialize:a}:Da.assertOptions(a,{encode:gt.function,serialize:gt.function},!0)),s.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?s.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:s.allowAbsoluteUrls=!0),Da.assertOptions(s,{baseUrl:gt.spelling("baseURL"),withXsrfToken:gt.spelling("withXSRFToken")},!0),s.method=(s.method||this.defaults.method||"get").toLowerCase();let d=u&&N.merge(u.common,u[s.method]);u&&N.forEach(["delete","get","head","post","put","patch","query","common"],F=>{delete u[F]}),s.headers=wt.concat(d,u);const h=[];let p=!0;this.interceptors.request.forEach(function(k){if(typeof k.runWhen=="function"&&k.runWhen(s)===!1)return;p=p&&k.synchronous;const w=s.transitional||cd;w&&w.legacyInterceptorReqResOrdering?h.unshift(k.fulfilled,k.rejected):h.push(k.fulfilled,k.rejected)});const m=[];this.interceptors.response.forEach(function(k){m.push(k.fulfilled,k.rejected)});let g,v=0,C;if(!p){const F=[ym.bind(this),void 0];for(F.unshift(...h),F.push(...m),C=F.length,g=Promise.resolve(s);v{if(!o._listeners)return;let u=o._listeners.length;for(;u-- >0;)o._listeners[u](a);o._listeners=null}),this.promise.then=a=>{let u;const d=new Promise(h=>{o.subscribe(h),u=h}).then(a);return d.cancel=function(){o.unsubscribe(u)},d},t(function(u,d,h){o.reason||(o.reason=new ci(u,d,h),s(o.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const s=this._listeners.indexOf(t);s!==-1&&this._listeners.splice(s,1)}toAbortSignal(){const t=new AbortController,s=o=>{t.abort(o)};return this.subscribe(s),t.signal.unsubscribe=()=>this.unsubscribe(s),t.signal}static source(){let t;return{token:new Vg(function(a){t=a}),cancel:t}}};function vk(r){return function(s){return r.apply(null,s)}}function wk(r){return N.isObject(r)&&r.isAxiosError===!0}const Dc={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Dc).forEach(([r,t])=>{Dc[t]=r});function Hg(r){const t=new Qr(r),s=xg(Qr.prototype.request,t);return N.extend(s,Qr.prototype,t,{allOwnKeys:!0}),N.extend(s,t,null,{allOwnKeys:!0}),s.create=function(a){return Hg(Zr(r,a))},s}const Ke=Hg(ui);Ke.Axios=Qr;Ke.CanceledError=ci;Ke.CancelToken=gk;Ke.isCancel=Mg;Ke.VERSION=fd;Ke.toFormData=Ka;Ke.AxiosError=X;Ke.Cancel=Ke.CanceledError;Ke.all=function(t){return Promise.all(t)};Ke.spread=vk;Ke.isAxiosError=wk;Ke.mergeConfig=Zr;Ke.AxiosHeaders=wt;Ke.formToJSON=r=>jg(N.isHTMLForm(r)?new FormData(r):r);Ke.getAdapter=$g.getAdapter;Ke.HttpStatusCode=Dc;Ke.default=Ke;const{Axios:$b,AxiosError:Vb,CanceledError:Hb,isCancel:qb,CancelToken:Wb,VERSION:Qb,all:Kb,Cancel:Gb,isAxiosError:Jb,spread:Xb,toFormData:Yb,AxiosHeaders:Zb,HttpStatusCode:eR,formToJSON:tR,getAdapter:nR,mergeConfig:rR,create:sR}=Ke,qg=typeof window>"u",vm=!qg&&window.self!==window.top,xk=!qg&&typeof document>"u",rc=()=>Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15),ct=[];for(let r=0;r<256;++r)ct.push((r+256).toString(16).slice(1));function Sk(r,t=0){return(ct[r[t+0]]+ct[r[t+1]]+ct[r[t+2]]+ct[r[t+3]]+"-"+ct[r[t+4]]+ct[r[t+5]]+"-"+ct[r[t+6]]+ct[r[t+7]]+"-"+ct[r[t+8]]+ct[r[t+9]]+"-"+ct[r[t+10]]+ct[r[t+11]]+ct[r[t+12]]+ct[r[t+13]]+ct[r[t+14]]+ct[r[t+15]]).toLowerCase()}let sc;const Ek=new Uint8Array(16);function _k(){if(!sc){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");sc=crypto.getRandomValues.bind(crypto)}return sc(Ek)}const kk=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),wm={randomUUID:kk};function Ck(r,t,s){var a;r=r||{};const o=r.random??((a=r.rng)==null?void 0:a.call(r))??_k();if(o.length<16)throw new Error("Random bytes length must be >= 16");return o[6]=o[6]&15|64,o[8]=o[8]&63|128,Sk(o)}function bk(r,t,s){return wm.randomUUID&&!r?wm.randomUUID():Ck(r)}const Mo=typeof window<"u"?window:{base44SharedInstances:{}};function Rk(r,t){return Mo.base44SharedInstances||(Mo.base44SharedInstances={}),Mo.base44SharedInstances[r]||(Mo.base44SharedInstances[r]={instance:t()}),Mo.base44SharedInstances[r].instance}const Tk="__user_heartbeat_event__",Pk="__initialization_event__",Ok="__session_duration_event__",xm="analytics-enable",Sm="base44_analytics_session_id",Nk={enabled:!0,maxQueueSize:1e3,throttleTime:1e3,batchSize:30,heartBeatInterval:60*1e3},Ak="analytics",Me=Rk(Ak,()=>({requestsQueue:[],isProcessing:!1,isHeartBeatProcessing:!1,wasInitializationTracked:!1,sessionContext:null,sessionStartTime:null,config:{...Nk,...zk()}})),Lk=({axiosClient:r,serverUrl:t,appId:s,userAuthModule:o})=>{var a;const{maxQueueSize:u,throttleTime:d,batchSize:h}=Me.config;if(!(!((a=Me.config)===null||a===void 0)&&a.enabled)||xk)return{track:()=>{},cleanup:()=>{}};let p;const m=`${t}/api/apps/${s}/analytics/track/batch`,g=async P=>{await r.request({method:"POST",url:`/apps/${s}/analytics/track/batch`,data:{events:P}})},v=P=>{try{const A=JSON.stringify({events:P}),V=new Blob([A],{type:"application/json"});return typeof navigator>"u"||A.length>6e4||!navigator.sendBeacon(m,V)}catch{return!1}},C=async(P,A={})=>{if(P.length===0)return;const V=await Uk(o),$=P.map(Fk(V));try{(!A.isBeacon||!v($))&&await g($)}catch{}},L=()=>{_m(C,{throttleTime:d,batchSize:h})},F=P=>{if(Me.requestsQueue.length>=u)return;const A=Mk();Me.requestsQueue.push({...P,...A}),L()},k=()=>{_m(C,{throttleTime:d,batchSize:h}),p=km(F),Dk()},w=()=>{Em(),p==null||p(),jk(F);const P=Me.requestsQueue.splice(0);C(P,{isBeacon:!0})},S=()=>{typeof window>"u"||(document.visibilityState==="hidden"?w():document.visibilityState==="visible"&&k())},I=()=>{Em(),p==null||p(),typeof window<"u"&&window.removeEventListener("visibilitychange",S)};return L(),p=km(F),Ik(F),typeof window<"u"&&window.addEventListener("visibilitychange",S),{track:F,cleanup:I}};function Em(){Me.isProcessing=!1}async function _m(r,t){if(Me.isProcessing)return;Me.isProcessing=!0;const{throttleTime:s=1e3,batchSize:o=30}=t??{};for(;Me.isProcessing&&Me.requestsQueue.length>0;){const a=Me.requestsQueue.splice(0,o);a.length&&await r(a),await new Promise(u=>setTimeout(u,s))}Me.isProcessing=!1}function km(r){var t;if(Me.isHeartBeatProcessing||((t=Me.config.heartBeatInterval)!==null&&t!==void 0?t:0)<10)return()=>{};Me.isHeartBeatProcessing=!0;const s=setInterval(()=>{r({eventName:Tk})},Me.config.heartBeatInterval);return()=>{clearInterval(s),Me.isHeartBeatProcessing=!1}}function Ik(r){typeof window>"u"||Me.wasInitializationTracked||(Me.wasInitializationTracked=!0,r({eventName:Pk,properties:{referrer:document==null?void 0:document.referrer}}))}function Dk(){typeof window>"u"||Me.sessionStartTime!==null||(Me.sessionStartTime=new Date().toISOString())}function jk(r){if(typeof window>"u"||Me.sessionStartTime===null)return;const t=new Date().getTime()-new Date(Me.sessionStartTime).getTime();Me.sessionStartTime=null,r({eventName:Ok,properties:{sessionDuration:t}})}function Mk(){return{timestamp:new Date().toISOString(),pageUrl:typeof window<"u"?window.location.pathname:null}}function Fk(r){return t=>({event_name:t.eventName,properties:t.properties,timestamp:t.timestamp,page_url:t.pageUrl,...r})}let oc=null;async function Uk(r){if(!Me.sessionContext){if(!oc){const t=pd();oc=r.me().then(s=>({user_id:s.id,session_id:t})).catch(()=>({user_id:null,session_id:t}))}Me.sessionContext=await oc}return Me.sessionContext}function zk(){if(typeof window>"u"||!window.location)return;const t=new URLSearchParams(window.location.search).get(xm);if(t==null||!t.length)return;const s=new URLSearchParams(window.location.search);s.delete(xm);const o=window.location.pathname+(s.toString()?"?"+s.toString():"");return window.history.replaceState({},"",o),{enabled:t==="true"}}function pd(){if(typeof window>"u")return rc();try{const r=localStorage.getItem(Sm);if(!r){const t=rc();return localStorage.setItem(Sm,t),t}return r}catch{return rc()}}class Bk extends Error{constructor(t,s,o,a,u){super(t),this.name="Base44Error",this.status=s,this.code=o,this.data=a,this.originalError=u}toJSON(){return{name:this.name,message:this.message,status:this.status,code:this.code,data:this.data}}}function zo({baseURL:r,headers:t={},token:s,interceptResponses:o=!0,onError:a}){const u=Ke.create({baseURL:r,headers:{"Content-Type":"application/json",Accept:"application/json",...t}});return s&&(u.defaults.headers.common.Authorization=`Bearer ${s}`),u.interceptors.request.use(d=>{typeof window<"u"&&window.location&&(d.headers.set("X-Origin-URL",window.location.href),d.headers.get("Authorization")||d.headers.set("X-Base44-Anonymous-Id",pd()));const h=bk();if(d.requestId=h,vm)try{window.parent.postMessage({type:"api-request-start",requestId:h,data:{url:r+d.url,method:d.method,body:d.data instanceof FormData?"[FormData object]":d.data}},"*")}catch{}return d}),o&&u.interceptors.response.use(d=>{var h;const p=(h=d.config)===null||h===void 0?void 0:h.requestId;try{vm&&p&&window.parent.postMessage({type:"api-request-end",requestId:p,data:{statusCode:d.status,response:d.data}},"*")}catch{}return d.data},d=>{var h,p,m,g,v,C,L,F;const k=((p=(h=d.response)===null||h===void 0?void 0:h.data)===null||p===void 0?void 0:p.message)||((g=(m=d.response)===null||m===void 0?void 0:m.data)===null||g===void 0?void 0:g.detail)||d.message,w=new Bk(k,(v=d.response)===null||v===void 0?void 0:v.status,(L=(C=d.response)===null||C===void 0?void 0:C.data)===null||L===void 0?void 0:L.code,(F=d.response)===null||F===void 0?void 0:F.data,d);return a==null||a(w),Promise.reject(w)}),u}function Cm(r){const{axios:t,appId:s,getSocket:o}=r;return new Proxy({},{get(a,u){if(!(typeof u!="string"||u==="then"||u.startsWith("_")))return Vk(t,s,u,o)}})}function $k(r){var t;try{const s=JSON.parse(r);return{type:s.type,data:s.data,id:s.id||((t=s.data)===null||t===void 0?void 0:t.id),timestamp:s.timestamp||new Date().toISOString()}}catch(s){return console.warn("[Base44 SDK] Failed to parse realtime message:",s),null}}function Vk(r,t,s,o){const a=`/apps/${t}/entities/${s}`;return{async list(u,d,h,p){const m={};return u&&(m.sort=u),d&&(m.limit=d),h&&(m.skip=h),p&&(m.fields=Array.isArray(p)?p.join(","):p),r.get(a,{params:m})},async filter(u,d,h,p,m){const g={q:JSON.stringify(u)};return d&&(g.sort=d),h&&(g.limit=h),p&&(g.skip=p),m&&(g.fields=Array.isArray(m)?m.join(","):m),r.get(a,{params:g})},async get(u){return r.get(`${a}/${u}`)},async create(u){return r.post(a,u)},async update(u,d){return r.put(`${a}/${u}`,d)},async delete(u){return r.delete(`${a}/${u}`)},async deleteMany(u){return r.delete(a,{data:u})},async bulkCreate(u){return r.post(`${a}/bulk`,u)},async updateMany(u,d){return r.patch(`${a}/update-many`,{query:u,data:d})},async bulkUpdate(u){return r.put(`${a}/bulk`,u)},async importEntities(u){const d=new FormData;return d.append("file",u,u.name),r.post(`${a}/import`,d,{headers:{"Content-Type":"multipart/form-data"}})},subscribe(u){const d=`entities:${t}:${s}`;return o().subscribeToRoom(d,{update_model:m=>{var g;const v=$k(m.data);if(v){v.type!=="delete"&&(!((g=v.data)===null||g===void 0)&&g._oversize)&&console.error(`[Base44 SDK] Realtime broadcast for ${s}#${v.id} was oversize and got slimmed for transport. Fields >10 KB are empty and the rest of the record may be a stub. Call \`entities.${s}.get("${v.id}")\` to fetch the full record.`);try{u(v)}catch(C){console.error("[Base44 SDK] Subscription callback error:",C)}}}})}}}function Hk(r,t){return{async call(s,o,a){if(!(s!=null&&s.trim()))throw new Error("Integration slug is required and cannot be empty");if(!(o!=null&&o.trim()))throw new Error("Operation ID is required and cannot be empty");const{pathParams:u,queryParams:d,...h}=a??{},p={...h,...u&&{path_params:u},...d&&{query_params:d}};return await r.post(`/apps/${t}/integrations/custom/${s}/${o}`,p)}}}function bm(r,t){const s=Hk(r,t);return new Proxy({},{get(o,a){if(!(typeof a!="string"||a==="then"||a.startsWith("_")))return a==="custom"?s:new Proxy({},{get(u,d){if(!(typeof d!="string"||d==="then"||d.startsWith("_")))return async h=>{if(typeof h=="string")throw new Error(`Integration ${d} must receive an object with named parameters, received: ${h}`);let p,m;return h instanceof FormData||h&&Object.values(h).some(g=>g instanceof File)?(p=new FormData,Object.keys(h).forEach(g=>{h[g]instanceof File?p.append(g,h[g],h[g].name):typeof h[g]=="object"&&h[g]!==null?p.append(g,JSON.stringify(h[g])):p.append(g,h[g])}),m="multipart/form-data"):(p=h,m="application/json"),a==="Core"?r.post(`/apps/${t}/integration-endpoints/Core/${d}`,p||h,{headers:{"Content-Type":m}}):r.post(`/apps/${t}/integration-endpoints/installable/${a}/integration-endpoints/${d}`,p||h,{headers:{"Content-Type":m}})}}})}})}function qk(){return typeof window>"u"?!1:window!==window.parent}function Wk(r,t,s){const u=Math.round(window.screenX+(window.outerWidth-500)/2),d=Math.round(window.screenY+(window.outerHeight-600)/2),h=window.open(r,"base44_auth",`width=500,height=600,left=${u},top=${d},resizable=yes,scrollbars=yes`);if(!h)return;const p=()=>{window.removeEventListener("message",m),clearInterval(g),h.closed||h.close()},m=v=>{var C;if(v.origin!==s||v.source!==h||!(!((C=v.data)===null||C===void 0)&&C.access_token))return;p();const L=new URL(t),{access_token:F,is_new_user:k}=v.data;L.searchParams.set("access_token",F),k!=null&&L.searchParams.set("is_new_user",String(k)),window.location.href=L.toString()},g=setInterval(()=>{h.closed&&p()},500);window.addEventListener("message",m)}function Qk(r,t,s,o){return{async me(){return r.get(`/apps/${s}/entities/User/me`)},async updateMe(a){return r.put(`/apps/${s}/entities/User/me`,a)},redirectToLogin(a){if(typeof window>"u")throw new Error("Login method can only be used in a browser environment");const u=a?new URL(a,window.location.origin).toString():window.location.href,d=`${o.appBaseUrl}/login?from_url=${encodeURIComponent(u)}`;window.location.href=d},loginWithProvider(a,u="/"){const d=new URL(u,window.location.origin).toString(),h=`app_id=${s}&from_url=${encodeURIComponent(d)}`;let p;a==="sso"?p=`/apps/${s}/auth/sso/login`:p=`/apps/auth${a==="google"?"":`/${a}`}/login`;const m=`${o.appBaseUrl}/api${p}?${h}`;if(qk()){const g=`${m}&popup_origin=${encodeURIComponent(window.location.origin)}`;return Wk(g,d,window.location.origin)}window.location.href=m},logout(a){if(delete r.defaults.headers.common.Authorization,typeof window<"u"){if(window.localStorage)try{window.localStorage.removeItem("base44_access_token"),window.localStorage.removeItem("token")}catch(h){console.error("Failed to remove token from localStorage:",h)}const u=a||window.location.href,d=`${o.appBaseUrl}/api/apps/auth/logout?from_url=${encodeURIComponent(u)}`;window.location.href=d}},setToken(a,u=!0){if(a&&(r.defaults.headers.common.Authorization=`Bearer ${a}`,t.defaults.headers.common.Authorization=`Bearer ${a}`,u&&typeof window<"u"&&window.localStorage))try{window.localStorage.setItem("base44_access_token",a),window.localStorage.setItem("token",a)}catch(d){console.error("Failed to save token to localStorage:",d)}},async loginViaEmailPassword(a,u,d){var h;try{const p=await r.post(`/apps/${s}/auth/login`,{email:a,password:u,...d&&{turnstile_token:d}}),{access_token:m,user:g}=p;return m&&this.setToken(m),{access_token:m,user:g}}catch(p){throw((h=p.response)===null||h===void 0?void 0:h.status)===401&&await this.logout(),p}},async isAuthenticated(){try{return await this.me(),!0}catch{return!1}},inviteUser(a,u){return r.post(`/apps/${s}/users/invite-user`,{user_email:a,role:u})},register(a){return r.post(`/apps/${s}/auth/register`,a)},verifyOtp({email:a,otpCode:u}){return r.post(`/apps/${s}/auth/verify-otp`,{email:a,otp_code:u})},resendOtp(a){return r.post(`/apps/${s}/auth/resend-otp`,{email:a})},resetPasswordRequest(a){return r.post(`/apps/${s}/auth/reset-password-request`,{email:a})},resetPassword({resetToken:a,newPassword:u}){return r.post(`/apps/${s}/auth/reset-password`,{reset_token:a,new_password:u})},changePassword({userId:a,currentPassword:u,newPassword:d}){return r.post(`/apps/${s}/auth/change-password`,{user_id:a,current_password:u,new_password:d})}}}function Kk(r,t){return{async getAccessToken(s){const o=`/apps/${t}/auth/sso/accesstoken/${s}`;return r.get(o)},async getIdToken(s){const o=`/apps/${t}/auth/sso/idtoken/${s}`;return r.get(o)}}}function Gk(r,t){return{async getAccessToken(s){if(!s||typeof s!="string")throw new Error("Integration type is required and must be a string");return(await r.get(`/apps/${t}/external-auth/tokens/${s}`)).access_token},async getConnection(s){var o;if(!s||typeof s!="string")throw new Error("Integration type is required and must be a string");const u=await r.get(`/apps/${t}/external-auth/tokens/${s}`);return{accessToken:u.access_token,connectionConfig:(o=u.connection_config)!==null&&o!==void 0?o:null}},async getWorkspaceConnection(s){var o;if(!s||typeof s!="string")throw new Error("Connector ID is required and must be a string");const u=await r.get(`/apps/${t}/external-auth/tokens/connectors/${s}`);return{accessToken:u.access_token,connectionConfig:(o=u.connection_config)!==null&&o!==void 0?o:null}},async getCurrentAppUserAccessToken(s){if(!s||typeof s!="string")throw new Error("Connector ID is required and must be a string");return(await r.get(`/apps/${t}/app-user-auth/connectors/${s}/token`)).access_token},async getCurrentAppUserConnection(s){var o;if(!s||typeof s!="string")throw new Error("Connector ID is required and must be a string");const u=await r.get(`/apps/${t}/app-user-auth/connectors/${s}/token`);return{accessToken:u.access_token,connectionConfig:(o=u.connection_config)!==null&&o!==void 0?o:null}}}}function Jk(r,t){return{async connectAppUser(s){if(!s||typeof s!="string")throw new Error("Connector ID is required and must be a string");return(await r.post(`/apps/${t}/app-user-auth/connectors/${s}/initiate`)).redirect_url},async disconnectAppUser(s){if(!s||typeof s!="string")throw new Error("Connector ID is required and must be a string");await r.delete(`/apps/${t}/app-user-auth/connectors/${s}`)}}}function Kr(r={}){const{storageKey:t="base44_access_token",paramName:s="access_token",saveToStorage:o=!0,removeFromUrl:a=!0}=r;let u=null;if(typeof window<"u"&&window.location)try{const d=new URLSearchParams(window.location.search);if(u=d.get(s),u){if(o&&Xk(u,{storageKey:t}),a){d.delete(s);const h=`${window.location.pathname}${d.toString()?`?${d.toString()}`:""}${window.location.hash}`;window.history.replaceState({},document.title,h)}return u}}catch(d){console.error("Error retrieving token from URL:",d)}if(typeof window<"u"&&window.localStorage)try{return u=window.localStorage.getItem(t),u}catch(d){console.error("Error retrieving token from local storage:",d)}return null}function Xk(r,t){const{storageKey:s="base44_access_token"}=t;if(typeof window>"u"||!window.localStorage||!r)return!1;try{return window.localStorage.setItem(s,r),window.localStorage.setItem("token",r),!0}catch(o){return console.error("Error saving token to local storage:",o),!1}}function Rm(r,t,s){const o=(u,d)=>u?`${String(u).replace(/\/$/,"")}${d}`:d,a=u=>{const d=new Headers;if(s!=null&&s.getAuthHeaders){const h=s.getAuthHeaders();Object.entries(h).forEach(([p,m])=>{m!=null&&d.set(p,String(m))})}return u&&new Headers(u).forEach((h,p)=>{d.set(p,h)}),d};return{async invoke(u,d){if(typeof d=="string")throw new Error(`Function ${u} must receive an object with named parameters, received: ${d}`);let h,p;return d instanceof FormData||d&&Object.values(d).some(m=>m instanceof File)?(h=new FormData,Object.keys(d).forEach(m=>{d[m]instanceof File?h.append(m,d[m],d[m].name):typeof d[m]=="object"&&d[m]!==null?h.append(m,JSON.stringify(d[m])):h.append(m,d[m])}),p="multipart/form-data"):(h=d,p="application/json"),r.post(`/apps/${t}/functions/${u}`,h||d,{headers:{"Content-Type":p}})},async fetch(u,d={}){const p=`/functions${u.startsWith("/")?u:`/${u}`}`,m=a(d.headers),g={...d,headers:m};return await fetch(o(s==null?void 0:s.baseURL,p),g)}}}function Tm({axios:r,getSocket:t,appId:s,serverUrl:o,token:a}){const u=`/apps/${s}/agents`,d={},h=()=>r.get(`${u}/conversations`),p=k=>r.get(`${u}/conversations/${k}`);return{getConversations:h,getConversation:p,listConversations:k=>r.get(`${u}/conversations`,{params:k}),createConversation:k=>r.post(`${u}/conversations`,k),addMessage:async(k,w)=>r.post(`${u}/conversations/v2/${k.id}/messages`,w),subscribeToConversation:(k,w)=>{const S=`/agent-conversations/${k}`,I=t(),P=p(k).then(A=>(d[k]=A,A));return I.subscribeToRoom(S,{connect:()=>{},update_model:async({data:A})=>{const V=JSON.parse(A);if(V._message){await P;const $=V._message,G=d[k];if(G){const B=G.messages||[],ie=B.findIndex(Se=>Se.id===$.id),ue=ie!==-1?B.map((Se,Te)=>Te===ie?$:Se):[...B,$];d[k]={...G,messages:ue},w==null||w(d[k])}}}})},getWhatsAppConnectURL:k=>{const w=`${o}/api/apps/${s}/agents/${encodeURIComponent(k)}/whatsapp`,S=a??Kr();return S?`${w}?token=${S}`:w},getTelegramConnectURL:k=>{const w=`${o}/api/apps/${s}/agents/${encodeURIComponent(k)}/telegram`,S=a??Kr();return S?`${w}?token=${S}`:w}}}function Pm({serverUrl:r,token:t,appId:s}){return{connection:()=>{var a;return{baseURL:`${r}/api/apps/${s}/ai/openai/v1`,token:(a=t??Kr())!==null&&a!==void 0?a:""}}}}function Om(r,t){const s=`/app-logs/${t}`;return{async logUserInApp(o){await r.post(`${s}/log-user-in-app/${o}`)},async fetchLogs(o={}){return await r.get(s,{params:o})},async getStats(o={}){return await r.get(`${s}/stats`,{params:o})}}}function Yk(r,t){return{async inviteUser(s,o){if(o!=="user"&&o!=="admin")throw new Error(`Invalid role: "${o}". Role must be either "user" or "admin".`);return await r.post(`/apps/${t}/runtime/users/invite-user`,{user_email:s,role:o})}}}const wn=Object.create(null);wn.open="0";wn.close="1";wn.ping="2";wn.pong="3";wn.message="4";wn.upgrade="5";wn.noop="6";const ja=Object.create(null);Object.keys(wn).forEach(r=>{ja[wn[r]]=r});const jc={type:"error",data:"parser error"},Wg=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Qg=typeof ArrayBuffer=="function",Kg=r=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(r):r&&r.buffer instanceof ArrayBuffer,md=({type:r,data:t},s,o)=>Wg&&t instanceof Blob?s?o(t):Nm(t,o):Qg&&(t instanceof ArrayBuffer||Kg(t))?s?o(t):Nm(new Blob([t]),o):o(wn[r]+(t||"")),Nm=(r,t)=>{const s=new FileReader;return s.onload=function(){const o=s.result.split(",")[1];t("b"+(o||""))},s.readAsDataURL(r)};function Am(r){return r instanceof Uint8Array?r:r instanceof ArrayBuffer?new Uint8Array(r):new Uint8Array(r.buffer,r.byteOffset,r.byteLength)}let ic;function Zk(r,t){if(Wg&&r.data instanceof Blob)return r.data.arrayBuffer().then(Am).then(t);if(Qg&&(r.data instanceof ArrayBuffer||Kg(r.data)))return t(Am(r.data));md(r,!1,s=>{ic||(ic=new TextEncoder),t(ic.encode(s))})}const Lm="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Bo=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let r=0;r{let t=r.length*.75,s=r.length,o,a=0,u,d,h,p;r[r.length-1]==="="&&(t--,r[r.length-2]==="="&&t--);const m=new ArrayBuffer(t),g=new Uint8Array(m);for(o=0;o>4,g[a++]=(d&15)<<4|h>>2,g[a++]=(h&3)<<6|p&63;return m},tC=typeof ArrayBuffer=="function",yd=(r,t)=>{if(typeof r!="string")return{type:"message",data:Gg(r,t)};const s=r.charAt(0);return s==="b"?{type:"message",data:nC(r.substring(1),t)}:ja[s]?r.length>1?{type:ja[s],data:r.substring(1)}:{type:ja[s]}:jc},nC=(r,t)=>{if(tC){const s=eC(r);return Gg(s,t)}else return{base64:!0,data:r}},Gg=(r,t)=>{switch(t){case"blob":return r instanceof Blob?r:new Blob([r]);case"arraybuffer":default:return r instanceof ArrayBuffer?r:r.buffer}},Jg="",rC=(r,t)=>{const s=r.length,o=new Array(s);let a=0;r.forEach((u,d)=>{md(u,!1,h=>{o[d]=h,++a===s&&t(o.join(Jg))})})},sC=(r,t)=>{const s=r.split(Jg),o=[];for(let a=0;a{const o=s.length;let a;if(o<126)a=new Uint8Array(1),new DataView(a.buffer).setUint8(0,o);else if(o<65536){a=new Uint8Array(3);const u=new DataView(a.buffer);u.setUint8(0,126),u.setUint16(1,o)}else{a=new Uint8Array(9);const u=new DataView(a.buffer);u.setUint8(0,127),u.setBigUint64(1,BigInt(o))}r.data&&typeof r.data!="string"&&(a[0]|=128),t.enqueue(a),t.enqueue(s)})}})}let ac;function Ra(r){return r.reduce((t,s)=>t+s.length,0)}function Ta(r,t){if(r[0].length===t)return r.shift();const s=new Uint8Array(t);let o=0;for(let a=0;aMath.pow(2,21)-1){h.enqueue(jc);break}a=g*Math.pow(2,32)+m.getUint32(4),o=3}else{if(Ra(s)r){h.enqueue(jc);break}}}})}const Xg=4;function Je(r){if(r)return aC(r)}function aC(r){for(var t in Je.prototype)r[t]=Je.prototype[t];return r}Je.prototype.on=Je.prototype.addEventListener=function(r,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+r]=this._callbacks["$"+r]||[]).push(t),this};Je.prototype.once=function(r,t){function s(){this.off(r,s),t.apply(this,arguments)}return s.fn=t,this.on(r,s),this};Je.prototype.off=Je.prototype.removeListener=Je.prototype.removeAllListeners=Je.prototype.removeEventListener=function(r,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var s=this._callbacks["$"+r];if(!s)return this;if(arguments.length==1)return delete this._callbacks["$"+r],this;for(var o,a=0;aPromise.resolve().then(t):(t,s)=>s(t,0),Kt=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),lC="arraybuffer";function Yg(r,...t){return t.reduce((s,o)=>(r.hasOwnProperty(o)&&(s[o]=r[o]),s),{})}const uC=Kt.setTimeout,cC=Kt.clearTimeout;function Xa(r,t){t.useNativeTimers?(r.setTimeoutFn=uC.bind(Kt),r.clearTimeoutFn=cC.bind(Kt)):(r.setTimeoutFn=Kt.setTimeout.bind(Kt),r.clearTimeoutFn=Kt.clearTimeout.bind(Kt))}const dC=1.33;function fC(r){return typeof r=="string"?hC(r):Math.ceil((r.byteLength||r.size)*dC)}function hC(r){let t=0,s=0;for(let o=0,a=r.length;o=57344?s+=3:(o++,s+=4);return s}function Zg(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function pC(r){let t="";for(let s in r)r.hasOwnProperty(s)&&(t.length&&(t+="&"),t+=encodeURIComponent(s)+"="+encodeURIComponent(r[s]));return t}function mC(r){let t={},s=r.split("&");for(let o=0,a=s.length;o{this.readyState="paused",t()};if(this._polling||!this.writable){let o=0;this._polling&&(o++,this.once("pollComplete",function(){--o||s()})),this.writable||(o++,this.once("drain",function(){--o||s()}))}else s()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const s=o=>{if(this.readyState==="opening"&&o.type==="open"&&this.onOpen(),o.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(o)};sC(t,this.socket.binaryType).forEach(s),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,rC(t,s=>{this.doWrite(s,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",s=this.query||{};return this.opts.timestampRequests!==!1&&(s[this.opts.timestampParam]=Zg()),!this.supportsBinary&&!s.sid&&(s.b64=1),this.createUri(t,s)}}let ev=!1;try{ev=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const vC=ev;function wC(){}class xC extends gC{constructor(t){if(super(t),typeof location<"u"){const s=location.protocol==="https:";let o=location.port;o||(o=s?"443":"80"),this.xd=typeof location<"u"&&t.hostname!==location.hostname||o!==t.port}}doWrite(t,s){const o=this.request({method:"POST",data:t});o.on("success",s),o.on("error",(a,u)=>{this.onError("xhr post error",a,u)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(s,o)=>{this.onError("xhr poll error",s,o)}),this.pollXhr=t}}class vn extends Je{constructor(t,s,o){super(),this.createRequest=t,Xa(this,o),this._opts=o,this._method=o.method||"GET",this._uri=s,this._data=o.data!==void 0?o.data:null,this._create()}_create(){var t;const s=Yg(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");s.xdomain=!!this._opts.xd;const o=this._xhr=this.createRequest(s);try{o.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){o.setDisableHeaderCheck&&o.setDisableHeaderCheck(!0);for(let a in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(a)&&o.setRequestHeader(a,this._opts.extraHeaders[a])}}catch{}if(this._method==="POST")try{o.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{o.setRequestHeader("Accept","*/*")}catch{}(t=this._opts.cookieJar)===null||t===void 0||t.addCookies(o),"withCredentials"in o&&(o.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(o.timeout=this._opts.requestTimeout),o.onreadystatechange=()=>{var a;o.readyState===3&&((a=this._opts.cookieJar)===null||a===void 0||a.parseCookies(o.getResponseHeader("set-cookie"))),o.readyState===4&&(o.status===200||o.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof o.status=="number"?o.status:0)},0))},o.send(this._data)}catch(a){this.setTimeoutFn(()=>{this._onError(a)},0);return}typeof document<"u"&&(this._index=vn.requestsCount++,vn.requests[this._index]=this)}_onError(t){this.emitReserved("error",t,this._xhr),this._cleanup(!0)}_cleanup(t){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=wC,t)try{this._xhr.abort()}catch{}typeof document<"u"&&delete vn.requests[this._index],this._xhr=null}}_onLoad(){const t=this._xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}vn.requestsCount=0;vn.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",Im);else if(typeof addEventListener=="function"){const r="onpagehide"in Kt?"pagehide":"unload";addEventListener(r,Im,!1)}}function Im(){for(let r in vn.requests)vn.requests.hasOwnProperty(r)&&vn.requests[r].abort()}const SC=(function(){const r=tv({xdomain:!1});return r&&r.responseType!==null})();class EC extends xC{constructor(t){super(t);const s=t&&t.forceBase64;this.supportsBinary=SC&&!s}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new vn(tv,this.uri(),t)}}function tv(r){const t=r.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||vC))return new XMLHttpRequest}catch{}if(!t)try{return new Kt[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const nv=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class _C extends gd{get name(){return"websocket"}doOpen(){const t=this.uri(),s=this.opts.protocols,o=nv?{}:Yg(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(o.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,s,o)}catch(a){return this.emitReserved("error",a)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let s=0;s{try{this.doWrite(o,u)}catch{}a&&Ja(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",s=this.query||{};return this.opts.timestampRequests&&(s[this.opts.timestampParam]=Zg()),this.supportsBinary||(s.b64=1),this.createUri(t,s)}}const lc=Kt.WebSocket||Kt.MozWebSocket;class kC extends _C{createSocket(t,s,o){return nv?new lc(t,s,o):s?new lc(t,s):new lc(t)}doWrite(t,s){this.ws.send(s)}}class CC extends gd{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(t){return this.emitReserved("error",t)}this._transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(t=>{const s=iC(Number.MAX_SAFE_INTEGER,this.socket.binaryType),o=t.readable.pipeThrough(s).getReader(),a=oC();a.readable.pipeTo(t.writable),this._writer=a.writable.getWriter();const u=()=>{o.read().then(({done:h,value:p})=>{h||(this.onPacket(p),u())}).catch(h=>{})};u();const d={type:"open"};this.query.sid&&(d.data=`{"sid":"${this.query.sid}"}`),this._writer.write(d).then(()=>this.onOpen())})})}write(t){this.writable=!1;for(let s=0;s{a&&Ja(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const bC={websocket:kC,webtransport:CC,polling:EC},RC=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,TC=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Mc(r){if(r.length>8e3)throw"URI too long";const t=r,s=r.indexOf("["),o=r.indexOf("]");s!=-1&&o!=-1&&(r=r.substring(0,s)+r.substring(s,o).replace(/:/g,";")+r.substring(o,r.length));let a=RC.exec(r||""),u={},d=14;for(;d--;)u[TC[d]]=a[d]||"";return s!=-1&&o!=-1&&(u.source=t,u.host=u.host.substring(1,u.host.length-1).replace(/;/g,":"),u.authority=u.authority.replace("[","").replace("]","").replace(/;/g,":"),u.ipv6uri=!0),u.pathNames=PC(u,u.path),u.queryKey=OC(u,u.query),u}function PC(r,t){const s=/\/{2,9}/g,o=t.replace(s,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&o.splice(0,1),t.slice(-1)=="/"&&o.splice(o.length-1,1),o}function OC(r,t){const s={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(o,a,u){a&&(s[a]=u)}),s}const Fc=typeof addEventListener=="function"&&typeof removeEventListener=="function",Ma=[];Fc&&addEventListener("offline",()=>{Ma.forEach(r=>r())},!1);class gr extends Je{constructor(t,s){if(super(),this.binaryType=lC,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,t&&typeof t=="object"&&(s=t,t=null),t){const o=Mc(t);s.hostname=o.host,s.secure=o.protocol==="https"||o.protocol==="wss",s.port=o.port,o.query&&(s.query=o.query)}else s.host&&(s.hostname=Mc(s.host).host);Xa(this,s),this.secure=s.secure!=null?s.secure:typeof location<"u"&&location.protocol==="https:",s.hostname&&!s.port&&(s.port=this.secure?"443":"80"),this.hostname=s.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=s.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},s.transports.forEach(o=>{const a=o.prototype.name;this.transports.push(a),this._transportsByName[a]=o}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},s),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=mC(this.opts.query)),Fc&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},Ma.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const s=Object.assign({},this.opts.query);s.EIO=Xg,s.transport=t,this.id&&(s.sid=this.id);const o=Object.assign({},this.opts,{query:s,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this._transportsByName[t](o)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const t=this.opts.rememberUpgrade&&gr.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const s=this.createTransport(t);s.open(),this.setTransport(s)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",s=>this._onClose("transport close",s))}onOpen(){this.readyState="open",gr.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const s=new Error("server error");s.code=t.data,this._onError(s);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},t),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let s=1;for(let o=0;o0&&s>this._maxPayload)return this.writeBuffer.slice(0,o);s+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,Ja(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,s,o){return this._sendPacket("message",t,s,o),this}send(t,s,o){return this._sendPacket("message",t,s,o),this}_sendPacket(t,s,o,a){if(typeof s=="function"&&(a=s,s=void 0),typeof o=="function"&&(a=o,o=null),this.readyState==="closing"||this.readyState==="closed")return;o=o||{},o.compress=o.compress!==!1;const u={type:t,data:s,options:o};this.emitReserved("packetCreate",u),this.writeBuffer.push(u),a&&this.once("flush",a),this.flush()}close(){const t=()=>{this._onClose("forced close"),this.transport.close()},s=()=>{this.off("upgrade",s),this.off("upgradeError",s),t()},o=()=>{this.once("upgrade",s),this.once("upgradeError",s)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?o():t()}):this.upgrading?o():t()),this}_onError(t){if(gr.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,s){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),Fc&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const o=Ma.indexOf(this._offlineEventListener);o!==-1&&Ma.splice(o,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,s),this.writeBuffer=[],this._prevBufferLen=0}}}gr.protocol=Xg;class NC extends gr{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let t=0;t{o||(s.send([{type:"ping",data:"probe"}]),s.once("packet",v=>{if(!o)if(v.type==="pong"&&v.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",s),!s)return;gr.priorWebsocketSuccess=s.name==="websocket",this.transport.pause(()=>{o||this.readyState!=="closed"&&(g(),this.setTransport(s),s.send([{type:"upgrade"}]),this.emitReserved("upgrade",s),s=null,this.upgrading=!1,this.flush())})}else{const C=new Error("probe error");C.transport=s.name,this.emitReserved("upgradeError",C)}}))};function u(){o||(o=!0,g(),s.close(),s=null)}const d=v=>{const C=new Error("probe error: "+v);C.transport=s.name,u(),this.emitReserved("upgradeError",C)};function h(){d("transport closed")}function p(){d("socket closed")}function m(v){s&&v.name!==s.name&&u()}const g=()=>{s.removeListener("open",a),s.removeListener("error",d),s.removeListener("close",h),this.off("close",p),this.off("upgrading",m)};s.once("open",a),s.once("error",d),s.once("close",h),this.once("close",p),this.once("upgrading",m),this._upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{o||s.open()},200):s.open()}onHandshake(t){this._upgrades=this._filterUpgrades(t.upgrades),super.onHandshake(t)}_filterUpgrades(t){const s=[];for(let o=0;obC[u]).filter(u=>!!u)),super(o?a:t,a)}};function LC(r,t="",s){let o=r;s=s||typeof location<"u"&&location,r==null&&(r=s.protocol+"//"+s.host),typeof r=="string"&&(r.charAt(0)==="/"&&(r.charAt(1)==="/"?r=s.protocol+r:r=s.host+r),/^(https?|wss?):\/\//.test(r)||(typeof s<"u"?r=s.protocol+"//"+r:r="https://"+r),o=Mc(r)),o.port||(/^(http|ws)$/.test(o.protocol)?o.port="80":/^(http|ws)s$/.test(o.protocol)&&(o.port="443")),o.path=o.path||"/";const u=o.host.indexOf(":")!==-1?"["+o.host+"]":o.host;return o.id=o.protocol+"://"+u+":"+o.port+t,o.href=o.protocol+"://"+u+(s&&s.port===o.port?"":":"+o.port),o}const IC=typeof ArrayBuffer=="function",DC=r=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(r):r.buffer instanceof ArrayBuffer,rv=Object.prototype.toString,jC=typeof Blob=="function"||typeof Blob<"u"&&rv.call(Blob)==="[object BlobConstructor]",MC=typeof File=="function"||typeof File<"u"&&rv.call(File)==="[object FileConstructor]";function vd(r){return IC&&(r instanceof ArrayBuffer||DC(r))||jC&&r instanceof Blob||MC&&r instanceof File}function Fa(r,t){if(!r||typeof r!="object")return!1;if(Array.isArray(r)){for(let s=0,o=r.length;s=0&&r.numthis.opts.maxAttachments)throw new Error("too many attachments");o.attachments=h}if(t.charAt(s+1)==="/"){const u=s+1;for(;++s&&!(t.charAt(s)===","||s===t.length););o.nsp=t.substring(u,s)}else o.nsp="/";const a=t.charAt(s+1);if(a!==""&&Number(a)==a){const u=s+1;for(;++s;){const d=t.charAt(s);if(d==null||Number(d)!=d){--s;break}if(s===t.length)break}o.id=Number(t.substring(u,s+1))}if(t.charAt(++s)){const u=this.tryParse(t.substr(s));if(wd.isPayloadValid(o.type,u))o.data=u;else throw new Error("invalid payload")}return o}tryParse(t){try{return JSON.parse(t,this.opts.reviver)}catch{return!1}}static isPayloadValid(t,s){switch(t){case Ne.CONNECT:return Dm(s);case Ne.DISCONNECT:return s===void 0;case Ne.CONNECT_ERROR:return typeof s=="string"||Dm(s);case Ne.EVENT:case Ne.BINARY_EVENT:return Array.isArray(s)&&(typeof s[0]=="number"||typeof s[0]=="string"&&zC.indexOf(s[0])===-1);case Ne.ACK:case Ne.BINARY_ACK:return Array.isArray(s)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class $C{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const s=UC(this.reconPack,this.buffers);return this.finishedReconstruction(),s}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const VC=Number.isInteger||function(r){return typeof r=="number"&&isFinite(r)&&Math.floor(r)===r};function Dm(r){return Object.prototype.toString.call(r)==="[object Object]"}const HC=Object.freeze(Object.defineProperty({__proto__:null,Decoder:wd,Encoder:BC,get PacketType(){return Ne}},Symbol.toStringTag,{value:"Module"}));function ln(r,t,s){return r.on(t,s),function(){r.off(t,s)}}const qC=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class sv extends Je{constructor(t,s,o){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=s,o&&o.auth&&(this.auth=o.auth),this._opts=Object.assign({},o),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[ln(t,"open",this.onopen.bind(this)),ln(t,"packet",this.onpacket.bind(this)),ln(t,"error",this.onerror.bind(this)),ln(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...s){var o,a,u;if(qC.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(s.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(s),this;const d={type:Ne.EVENT,data:s};if(d.options={},d.options.compress=this.flags.compress!==!1,typeof s[s.length-1]=="function"){const g=this.ids++,v=s.pop();this._registerAckCallback(g,v),d.id=g}const h=(a=(o=this.io.engine)===null||o===void 0?void 0:o.transport)===null||a===void 0?void 0:a.writable,p=this.connected&&!(!((u=this.io.engine)===null||u===void 0)&&u._hasPingExpired());return this.flags.volatile&&!h||(p?(this.notifyOutgoingListeners(d),this.packet(d)):this.sendBuffer.push(d)),this.flags={},this}_registerAckCallback(t,s){var o;const a=(o=this.flags.timeout)!==null&&o!==void 0?o:this._opts.ackTimeout;if(a===void 0){this.acks[t]=s;return}const u=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let h=0;h{this.io.clearTimeoutFn(u),s.apply(this,h)};d.withError=!0,this.acks[t]=d}emitWithAck(t,...s){return new Promise((o,a)=>{const u=(d,h)=>d?a(d):o(h);u.withError=!0,s.push(u),this.emit(t,...s)})}_addToQueue(t){let s;typeof t[t.length-1]=="function"&&(s=t.pop());const o={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((a,...u)=>(this._queue[0],a!==null?o.tryCount>this._opts.retries&&(this._queue.shift(),s&&s(a)):(this._queue.shift(),s&&s(null,...u)),o.pending=!1,this._drainQueue())),this._queue.push(o),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const s=this._queue[0];s.pending&&!t||(s.pending=!0,s.tryCount++,this.flags=s.flags,this.emit.apply(this,s.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:Ne.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,s){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,s),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(t=>{if(!this.sendBuffer.some(o=>String(o.id)===t)){const o=this.acks[t];delete this.acks[t],o.withError&&o.call(this,new Error("socket has been disconnected"))}})}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case Ne.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case Ne.EVENT:case Ne.BINARY_EVENT:this.onevent(t);break;case Ne.ACK:case Ne.BINARY_ACK:this.onack(t);break;case Ne.DISCONNECT:this.ondisconnect();break;case Ne.CONNECT_ERROR:this.destroy();const o=new Error(t.data.message);o.data=t.data.data,this.emitReserved("connect_error",o);break}}onevent(t){const s=t.data||[];t.id!=null&&s.push(this.ack(t.id)),this.connected?this.emitEvent(s):this.receiveBuffer.push(Object.freeze(s))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const s=this._anyListeners.slice();for(const o of s)o.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const s=this;let o=!1;return function(...a){o||(o=!0,s.packet({type:Ne.ACK,id:t,data:a}))}}onack(t){const s=this.acks[t.id];typeof s=="function"&&(delete this.acks[t.id],s.withError&&t.data.unshift(null),s.apply(this,t.data))}onconnect(t,s){this.id=t,this.recovered=s&&this._pid===s,this._pid=s,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:Ne.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const s=this._anyListeners;for(let o=0;o0&&r.jitter<=1?r.jitter:0,this.attempts=0}Ks.prototype.duration=function(){var r=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),s=Math.floor(t*this.jitter*r);r=(Math.floor(t*10)&1)==0?r-s:r+s}return Math.min(r,this.max)|0};Ks.prototype.reset=function(){this.attempts=0};Ks.prototype.setMin=function(r){this.ms=r};Ks.prototype.setMax=function(r){this.max=r};Ks.prototype.setJitter=function(r){this.jitter=r};class Bc extends Je{constructor(t,s){var o;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(s=t,t=void 0),s=s||{},s.path=s.path||"/socket.io",this.opts=s,Xa(this,s),this.reconnection(s.reconnection!==!1),this.reconnectionAttempts(s.reconnectionAttempts||1/0),this.reconnectionDelay(s.reconnectionDelay||1e3),this.reconnectionDelayMax(s.reconnectionDelayMax||5e3),this.randomizationFactor((o=s.randomizationFactor)!==null&&o!==void 0?o:.5),this.backoff=new Ks({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(s.timeout==null?2e4:s.timeout),this._readyState="closed",this.uri=t;const a=s.parser||HC;this.encoder=new a.Encoder,this.decoder=new a.Decoder,this._autoConnect=s.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,t||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var s;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(s=this.backoff)===null||s===void 0||s.setMin(t),this)}randomizationFactor(t){var s;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(s=this.backoff)===null||s===void 0||s.setJitter(t),this)}reconnectionDelayMax(t){var s;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(s=this.backoff)===null||s===void 0||s.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new AC(this.uri,this.opts);const s=this.engine,o=this;this._readyState="opening",this.skipReconnect=!1;const a=ln(s,"open",function(){o.onopen(),t&&t()}),u=h=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",h),t?t(h):this.maybeReconnectOnOpen()},d=ln(s,"error",u);if(this._timeout!==!1){const h=this._timeout,p=this.setTimeoutFn(()=>{a(),u(new Error("timeout")),s.close()},h);this.opts.autoUnref&&p.unref(),this.subs.push(()=>{this.clearTimeoutFn(p)})}return this.subs.push(a),this.subs.push(d),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(ln(t,"ping",this.onping.bind(this)),ln(t,"data",this.ondata.bind(this)),ln(t,"error",this.onerror.bind(this)),ln(t,"close",this.onclose.bind(this)),ln(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(s){this.onclose("parse error",s)}}ondecoded(t){Ja(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,s){let o=this.nsps[t];return o?this._autoConnect&&!o.active&&o.connect():(o=new sv(this,t,s),this.nsps[t]=o),o}_destroy(t){const s=Object.keys(this.nsps);for(const o of s)if(this.nsps[o].active)return;this._close()}_packet(t){const s=this.encoder.encode(t);for(let o=0;ot()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(t,s){var o;this.cleanup(),(o=this.engine)===null||o===void 0||o.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,s),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const s=this.backoff.duration();this._reconnecting=!0;const o=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(a=>{a?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",a)):t.onreconnect()}))},s);this.opts.autoUnref&&o.unref(),this.subs.push(()=>{this.clearTimeoutFn(o)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const Fo={};function Ua(r,t){typeof r=="object"&&(t=r,r=void 0),t=t||{};const s=LC(r,t.path||"/socket.io"),o=s.source,a=s.id,u=s.path,d=Fo[a]&&u in Fo[a].nsps,h=t.forceNew||t["force new connection"]||t.multiplex===!1||d;let p;return h?p=new Bc(o,t):(Fo[a]||(Fo[a]=new Bc(o,t)),p=Fo[a]),s.query&&!t.query&&(t.query=s.queryKey),p.socket(s.path,t)}Object.assign(Ua,{Manager:Bc,Socket:sv,io:Ua,connect:Ua});const WC=250;function jm(r,t){var s;const o=(s=r.token)!==null&&s!==void 0?s:Kr(),a={app_id:r.appId,token:o};o||(a.anonymous_id=pd());const u=Ua(r.serverUrl,{path:r.mountPath,transports:r.transports,query:a});return u.on("connect",async()=>{var d;return console.log("connect",u.id),(d=t.connect)===null||d===void 0?void 0:d.call(t)}),u.on("update_model",async d=>{var h;return(h=t.update_model)===null||h===void 0?void 0:h.call(t,d)}),u.on("error",async d=>{var h;return(h=t.error)===null||h===void 0?void 0:h.call(t,d)}),u.on("connect_error",async d=>{var h;return console.error("connect_error",d),(h=t.error)===null||h===void 0?void 0:h.call(t,d)}),u}function QC({config:r}){let t={...r};const s={},o={},a={connect:async()=>{const S=[];Object.keys(s).forEach(I=>{const P=C(I);P.length!==0&&(m(I),P.forEach(({connect:A})=>{const V=async()=>A==null?void 0:A();S.push(V())}))}),await Promise.all(S)},update_model:async S=>{const P=C(S.room).map(A=>{var V;return(V=A.update_model)===null||V===void 0?void 0:V.call(A,S)});await Promise.all(P)},error:async S=>{console.error("error",S);const I=Object.values(s).flat().map(P=>{var A;return(A=P.error)===null||A===void 0?void 0:A.call(P,S)});await Promise.all(I)}};let u=jm(r,a);function d(){h()}function h(){F(),u&&u.disconnect()}function p(S){d(),t={...t,...S},u=jm(t,a)}function m(S){u.emit("join",S)}function g(S){u.emit("leave",S)}async function v(S,I){var P;const A=JSON.stringify(I);return(P=a.update_model)===null||P===void 0?void 0:P.call(a,{room:S,data:A})}function C(S){var I;return(I=s[S])!==null&&I!==void 0?I:[]}function L(S){const I=o[S];I&&(clearTimeout(I),delete o[S])}function F(){Object.keys(o).forEach(S=>{var I,P;clearTimeout(o[S]),delete o[S],((P=(I=s[S])===null||I===void 0?void 0:I.length)!==null&&P!==void 0?P:0)===0&&delete s[S]})}function k(S){L(S),o[S]=setTimeout(()=>{var I,P;delete o[S],!(((P=(I=s[S])===null||I===void 0?void 0:I.length)!==null&&P!==void 0?P:0)>0)&&(g(S),delete s[S])},WC)}return{socket:u,subscribeToRoom:(S,I)=>{s[S]?L(S):(m(S),s[S]=[]),s[S].push(I);let P=!1;return()=>{var A,V;P||(P=!0,s[S]=(V=(A=s[S])===null||A===void 0?void 0:A.filter($=>$!==I))!==null&&V!==void 0?V:[],s[S].length===0&&k(S))}},updateConfig:p,updateModel:v,disconnect:h}}(!globalThis.EventTarget||!globalThis.Event)&&console.error(` PartySocket requires a global 'EventTarget' class to be available! You can polyfill this global by adding this to your code before any partysocket imports: \`\`\` import 'partysocket/event-target-polyfill'; \`\`\` Please file an issue at https://github.com/partykit/partykit if you're still having trouble. `);var ov=class extends Event{constructor(t,s){super("error",s);Ie(this,"message");Ie(this,"error");this.message=t.message,this.error=t}},iv=class extends Event{constructor(t=1e3,s="",o){super("close",o);Ie(this,"code");Ie(this,"reason");Ie(this,"wasClean",!0);this.code=t,this.reason=s}},uc={Event,ErrorEvent:ov,CloseEvent:iv};function KC(r,t){if(!r)throw new Error(t)}function GC(r){return new r.constructor(r.type,r)}function JC(r){return"data"in r?new MessageEvent(r.type,r):"code"in r||"reason"in r?new iv(r.code||1999,r.reason||"unknown reason",r):"error"in r?new ov(r.error,r):new Event(r.type,r)}var Ym,XC=typeof process<"u"&&typeof((Ym=process.versions)==null?void 0:Ym.node)<"u"&&typeof document>"u",Pa=XC?JC:GC,Ir={maxReconnectionDelay:1e4,minReconnectionDelay:1e3+Math.random()*4e3,minUptime:5e3,reconnectionDelayGrowFactor:1.3,connectionTimeout:4e3,maxRetries:1/0,maxEnqueuedMessages:1/0},Mm=!1,YC=class Dr extends EventTarget{constructor(s,o,a={}){super();Ie(this,"_ws");Ie(this,"_retryCount",-1);Ie(this,"_uptimeTimeout");Ie(this,"_connectTimeout");Ie(this,"_shouldReconnect",!0);Ie(this,"_connectLock",!1);Ie(this,"_binaryType","blob");Ie(this,"_closeCalled",!1);Ie(this,"_messageQueue",[]);Ie(this,"_url");Ie(this,"_protocols");Ie(this,"_options");Ie(this,"onclose",null);Ie(this,"onerror",null);Ie(this,"onmessage",null);Ie(this,"onopen",null);Ie(this,"_handleOpen",s=>{this._debug("open event");const{minUptime:o=Ir.minUptime}=this._options;clearTimeout(this._connectTimeout),this._uptimeTimeout=setTimeout(()=>this._acceptOpen(),o),KC(this._ws,"WebSocket is not defined"),this._ws.binaryType=this._binaryType,this._messageQueue.forEach(a=>{var u;return(u=this._ws)==null?void 0:u.send(a)}),this._messageQueue=[],this.onopen&&this.onopen(s),this.dispatchEvent(Pa(s))});Ie(this,"_handleMessage",s=>{this._debug("message event"),this.onmessage&&this.onmessage(s),this.dispatchEvent(Pa(s))});Ie(this,"_handleError",s=>{this._debug("error event",s.message),this._disconnect(void 0,s.message==="TIMEOUT"?"timeout":void 0),this.onerror&&this.onerror(s),this._debug("exec error listeners"),this.dispatchEvent(Pa(s)),this._connect()});Ie(this,"_handleClose",s=>{this._debug("close event"),this._clearTimeouts(),this._shouldReconnect&&this._connect(),this.onclose&&this.onclose(s),this.dispatchEvent(Pa(s))});this._url=s,this._protocols=o,this._options=a,this._options.startClosed&&(this._shouldReconnect=!1),this._connect()}static get CONNECTING(){return 0}static get OPEN(){return 1}static get CLOSING(){return 2}static get CLOSED(){return 3}get CONNECTING(){return Dr.CONNECTING}get OPEN(){return Dr.OPEN}get CLOSING(){return Dr.CLOSING}get CLOSED(){return Dr.CLOSED}get binaryType(){return this._ws?this._ws.binaryType:this._binaryType}set binaryType(s){this._binaryType=s,this._ws&&(this._ws.binaryType=s)}get retryCount(){return Math.max(this._retryCount,0)}get bufferedAmount(){return this._messageQueue.reduce((o,a)=>(typeof a=="string"?o+=a.length:a instanceof Blob?o+=a.size:o+=a.byteLength,o),0)+(this._ws?this._ws.bufferedAmount:0)}get extensions(){return this._ws?this._ws.extensions:""}get protocol(){return this._ws?this._ws.protocol:""}get readyState(){return this._ws?this._ws.readyState:this._options.startClosed?Dr.CLOSED:Dr.CONNECTING}get url(){return this._ws?this._ws.url:""}get shouldReconnect(){return this._shouldReconnect}close(s=1e3,o){if(this._closeCalled=!0,this._shouldReconnect=!1,this._clearTimeouts(),!this._ws){this._debug("close enqueued: no ws instance");return}if(this._ws.readyState===this.CLOSED){this._debug("close: already closed");return}this._ws.close(s,o)}reconnect(s,o){this._shouldReconnect=!0,this._closeCalled=!1,this._retryCount=-1,!this._ws||this._ws.readyState===this.CLOSED?this._connect():(this._disconnect(s,o),this._connect())}send(s){if(this._ws&&this._ws.readyState===this.OPEN)this._debug("send",s),this._ws.send(s);else{const{maxEnqueuedMessages:o=Ir.maxEnqueuedMessages}=this._options;this._messageQueue.length",...s])}_getNextDelay(){const{reconnectionDelayGrowFactor:s=Ir.reconnectionDelayGrowFactor,minReconnectionDelay:o=Ir.minReconnectionDelay,maxReconnectionDelay:a=Ir.maxReconnectionDelay}=this._options;let u=0;return this._retryCount>0&&(u=o*Math.pow(s,this._retryCount-1),u>a&&(u=a)),this._debug("next delay",u),u}_wait(){return new Promise(s=>{setTimeout(s,this._getNextDelay())})}_getNextProtocols(s){if(!s)return Promise.resolve(null);if(typeof s=="string"||Array.isArray(s))return Promise.resolve(s);if(typeof s=="function"){const o=s();if(!o)return Promise.resolve(null);if(typeof o=="string"||Array.isArray(o))return Promise.resolve(o);if(o.then)return o}throw Error("Invalid protocols")}_getNextUrl(s){if(typeof s=="string")return Promise.resolve(s);if(typeof s=="function"){const o=s();if(typeof o=="string")return Promise.resolve(o);if(o.then)return o}throw Error("Invalid URL")}_connect(){if(this._connectLock||!this._shouldReconnect)return;this._connectLock=!0;const{maxRetries:s=Ir.maxRetries,connectionTimeout:o=Ir.connectionTimeout}=this._options;if(this._retryCount>=s){this._debug("max retries reached",this._retryCount,">=",s);return}this._retryCount++,this._debug("connect",this._retryCount),this._removeListeners(),this._wait().then(()=>Promise.all([this._getNextUrl(this._url),this._getNextProtocols(this._protocols||null)])).then(([a,u])=>{if(this._closeCalled){this._connectLock=!1;return}!this._options.WebSocket&&typeof WebSocket>"u"&&!Mm&&(console.error(`‼️ No WebSocket implementation available. You should define options.WebSocket. For example, if you're using node.js, run \`npm install ws\`, and then in your code: import PartySocket from 'partysocket'; import WS from 'ws'; const partysocket = new PartySocket({ host: "127.0.0.1:1999", room: "test-room", WebSocket: WS }); `),Mm=!0);const d=this._options.WebSocket||WebSocket;this._debug("connect",{url:a,protocols:u}),this._ws=u?new d(a,u):new d(a),this._ws.binaryType=this._binaryType,this._connectLock=!1,this._addListeners(),this._connectTimeout=setTimeout(()=>this._handleTimeout(),o)}).catch(a=>{this._connectLock=!1,this._handleError(new uc.ErrorEvent(Error(a.message),this))})}_handleTimeout(){this._debug("timeout event"),this._handleError(new uc.ErrorEvent(Error("TIMEOUT"),this))}_disconnect(s=1e3,o){if(this._clearTimeouts(),!!this._ws){this._removeListeners();try{this._ws.close(s,o),this._handleClose(new uc.CloseEvent(s,o,this))}catch{}}}_acceptOpen(){this._debug("accept open"),this._retryCount=0}_removeListeners(){this._ws&&(this._debug("removeListeners"),this._ws.removeEventListener("open",this._handleOpen),this._ws.removeEventListener("close",this._handleClose),this._ws.removeEventListener("message",this._handleMessage),this._ws.removeEventListener("error",this._handleError))}_addListeners(){this._ws&&(this._debug("addListeners"),this._ws.addEventListener("open",this._handleOpen),this._ws.addEventListener("close",this._handleClose),this._ws.addEventListener("message",this._handleMessage),this._ws.addEventListener("error",this._handleError))}_clearTimeouts(){clearTimeout(this._connectTimeout),clearTimeout(this._uptimeTimeout)}};/*! * Reconnecting WebSocket * by Pedro Ladaria * https://github.com/pladaria/reconnecting-websocket * License MIT */var ZC=r=>r[1]!==null&&r[1]!==void 0;function eb(){if(typeof crypto<"u"&&crypto.randomUUID)return crypto.randomUUID();let r=new Date().getTime(),t=typeof performance<"u"&&performance.now&&performance.now()*1e3||0;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(s){let o=Math.random()*16;return r>0?(o=(r+o)%16|0,r=Math.floor(r/16)):(o=(t+o)%16|0,t=Math.floor(t/16)),(s==="x"?o:o&3|8).toString(16)})}function av(r,t,s={}){const{host:o,path:a,protocol:u,room:d,party:h,query:p}=r;let m=o.replace(/^(http|https|ws|wss):\/\//,"");if(m.endsWith("/")&&(m=m.slice(0,-1)),a&&a.startsWith("/"))throw new Error("path must not start with a slash");const g=h??"main",v=a?`/${a}`:"",C=u||(m.startsWith("localhost:")||m.startsWith("127.0.0.1:")||m.startsWith("192.168.")||m.startsWith("10.")||m.startsWith("172.")&&m.split(".")[1]>="16"&&m.split(".")[1]<="31"||m.startsWith("[::ffff:7f00:1]:")?t:t+"s"),L=`${C}://${m}/${h?`parties/${h}`:"party"}/${d}${v}`,F=(w={})=>`${L}?${new URLSearchParams([...Object.entries(s),...Object.entries(w).filter(ZC)])}`,k=typeof p=="function"?async()=>F(await p()):F(p);return{host:m,path:v,room:d,name:g,protocol:C,partyUrl:L,urlProvider:k}}var tb=class extends YC{constructor(t){const s=Fm(t);super(s.urlProvider,s.protocols,s.socketOptions);Ie(this,"_pk");Ie(this,"_pkurl");Ie(this,"name");Ie(this,"room");Ie(this,"host");Ie(this,"path");this.partySocketOptions=t,this.setWSProperties(s)}updateProperties(t){const s=Fm({...t,host:t.host??this.host,room:t.room??this.room,path:t.path??this.path});this._url=s.urlProvider,this._protocols=s.protocols,this._options=s.socketOptions,this.setWSProperties(s)}setWSProperties(t){const{_pk:s,_pkurl:o,name:a,room:u,host:d,path:h}=t;this._pk=s,this._pkurl=o,this.name=a,this.room=u,this.host=d,this.path=h}reconnect(t,s){if(!this.room||!this.host)throw new Error("The room and host must be set before connecting, use `updateProperties` method to set them or pass them to the constructor.");super.reconnect(t,s)}get id(){return this._pk}get roomUrl(){return this._pkurl}static async fetch(t,s){const o=av(t,"http"),a=typeof o.urlProvider=="string"?o.urlProvider:await o.urlProvider();return(t.fetch??fetch)(a,s)}};function Fm(r){const{id:t,host:s,path:o,party:a,room:u,protocol:d,query:h,protocols:p,...m}=r,g=t||eb(),v=av(r,"ws",{_pk:g});return{_pk:g,_pkurl:v.partyUrl,name:v.name,room:v.room,host:v.host,path:v.path,protocols:p,socketOptions:m,urlProvider:v.urlProvider}}const nb=1e3,rb=3e3;class sb{constructor(t,s,o,a,u){var d;this.onClose=u,this.listeners=new Set,this.heartbeat=null,this.id=(d=a==null?void 0:a.id)!==null&&d!==void 0?d:crypto.randomUUID();const h=new tb({host:o.host,party:t,room:s,id:this.id,query:()=>{const g=o.getAuthToken();return{app_id:o.appId,handler:t,...g?{token:g}:{},...o.functionsVersion?{fv:o.functionsVersion}:{}}}});this.ws=h;let p=Date.now();const m=()=>{p=Date.now()};h.addEventListener("open",m),h.addEventListener("message",g=>{m();let v;try{v=JSON.parse(g.data)}catch{return}if((v&&typeof v=="object"?v.type:void 0)!=="__pong")for(const L of this.listeners)L(v)}),this.heartbeat=setInterval(()=>{if(Date.now()-p>rb){m(),h.reconnect();return}try{h.send(JSON.stringify({type:"__ping"}))}catch{}},nb)}subscribe(t){return this.listeners.add(t),{unsubscribe:()=>{this.listeners.delete(t)}}}send(t){this.ws.send(JSON.stringify(t))}close(){this.heartbeat&&(clearInterval(this.heartbeat),this.heartbeat=null),this.listeners.clear(),this.ws.close(),this.onClose()}}function ob(r,t,s,o){let a=null;return{connect(u){if(a)return a;const d=new sb(r,t,s,u,()=>{o.delete(d),a===d&&(a=null)});return a=d,o.add(d),d}}}function ib(r,t){return r&&!r.startsWith("/")?r:t??r}function ab(r){const t=new Set;return{module:new Proxy({},{get(o,a){if(!(typeof a!="string"||a==="then"))return u=>ob(a,u,r,t)}}),closeAll:()=>{for(const o of[...t])o.close()}}}function lb(r){var t,s,o;const{serverUrl:a="https://base44.app",appId:u,token:d,serviceToken:h,requiresAuth:p=!1,appBaseUrl:m,options:g,functionsVersion:v,headers:C}=r,L=typeof m=="string"?m:"",F={serverUrl:a,mountPath:"/ws-user-apps/socket.io/",transports:["websocket"],appId:u,token:d};let k=null;const w=()=>(k||(k=QC({config:F})),k),S={...C,"X-App-Id":String(u)},I=v?{...S,"Base44-Functions-Version":v}:S,P=zo({baseURL:`${a}/api`,headers:S,token:d,onError:g==null?void 0:g.onError}),A=zo({baseURL:`${a}/api`,headers:I,token:d,interceptResponses:!1,onError:g==null?void 0:g.onError}),V={...S,...d?{"on-behalf-of":`Bearer ${d}`}:{}},$=zo({baseURL:`${a}/api`,headers:V,token:h,onError:g==null?void 0:g.onError}),G=zo({baseURL:`${a}/api`,headers:I,token:h,interceptResponses:!1}),B=Qk(P,A,u,{appBaseUrl:L});if(typeof window<"u"){const xe=d||Kr();xe&&B.setToken(xe)}const ie=ab({appId:u,host:ib(a,typeof window<"u"?(t=window.location)===null||t===void 0?void 0:t.origin:void 0),functionsVersion:v,getAuthToken:()=>d||Kr()}),ue={entities:Cm({axios:P,appId:u,getSocket:w}),integrations:bm(P,u),connectors:Jk(P,u),auth:B,functions:Rm(A,u,{getAuthHeaders:()=>{const xe={},Y=d||Kr();return Y&&(xe.Authorization=`Bearer ${Y}`),xe},baseURL:(s=A.defaults)===null||s===void 0?void 0:s.baseURL}),agents:Tm({axios:P,getSocket:w,appId:u,serverUrl:a,token:d}),aiGateway:Pm({serverUrl:a,token:d,appId:u}),appLogs:Om(P,u),users:Yk(P,u),analytics:Lk({axiosClient:P,serverUrl:a,appId:u,userAuthModule:B}),actors:ie.module,cleanup:()=>{ue.analytics.cleanup(),ie.closeAll(),k&&k.disconnect()}},Se={entities:Cm({axios:$,appId:u,getSocket:w}),integrations:bm($,u),sso:Kk($,u),connectors:Gk($,u),functions:Rm(G,u,{getAuthHeaders:()=>{const xe={};return h&&(xe.Authorization=`Bearer ${h}`),xe},baseURL:(o=G.defaults)===null||o===void 0?void 0:o.baseURL}),agents:Tm({axios:$,getSocket:w,appId:u,serverUrl:a,token:d}),aiGateway:Pm({serverUrl:a,token:h,appId:u}),appLogs:Om($,u),cleanup:()=>{k&&k.disconnect()}};return p&&typeof window<"u"&&setTimeout(async()=>{try{await ue.auth.isAuthenticated()||ue.auth.redirectToLogin(window.location.href)}catch(xe){console.error("Authentication check failed:",xe),ue.auth.redirectToLogin(window.location.href)}},0),{...ue,setToken(xe){ue.auth.setToken(xe),k&&k.updateConfig({token:xe}),F.token=xe},getConfig(){return{serverUrl:a,appId:u,requiresAuth:p}},get asServiceRole(){if(!h)throw new Error("Service token is required to use asServiceRole. Please provide a serviceToken when creating the client.");return Se}}}const lv=typeof window>"u",ub=lv?{localStorage:new Map}:window,qo=ub.localStorage,cb=r=>r.replace(/([A-Z])/g,"_$1").toLowerCase(),Ts=(r,{defaultValue:t=void 0,removeFromUrl:s=!1}={})=>{if(lv)return t;const o=`base44_${cb(r)}`,a=new URLSearchParams(window.location.search),u=a.get(r);if(s){a.delete(r);const h=`${window.location.pathname}${a.toString()?`?${a.toString()}`:""}${window.location.hash}`;window.history.replaceState({},document.title,h)}if(u)return qo.setItem(o,u),u;if(t)return qo.setItem(o,t),t;const d=qo.getItem(o);return d||null},db=()=>(Ts("clear_access_token")==="true"&&(qo.removeItem("base44_access_token"),qo.removeItem("token")),{appId:Ts("app_id",{defaultValue:"6a7ddb9eaad1e8063fb8c3be"}),token:Ts("access_token",{removeFromUrl:!0}),fromUrl:Ts("from_url",{defaultValue:window.location.href}),functionsVersion:Ts("functions_version",{defaultValue:"prod"}),appBaseUrl:Ts("app_base_url",{defaultValue:void 0})}),$o={...db()},{appId:fb,token:hb,functionsVersion:pb,appBaseUrl:mb}=$o,Vo=lb({appId:fb,token:hb,functionsVersion:pb,serverUrl:"",requiresAuth:!1,appBaseUrl:mb});function yb({}){var a;const t=qs().pathname.substring(1),{data:s,isFetched:o}=yE({queryKey:["user"],queryFn:async()=>{try{return{user:await Vo.auth.me(),isAuthenticated:!0}}catch{return{user:null,isAuthenticated:!1}}}});return E.jsx("div",{className:"min-h-screen flex items-center justify-center p-6 bg-slate-50",children:E.jsx("div",{className:"max-w-md w-full",children:E.jsxs("div",{className:"text-center space-y-6",children:[E.jsxs("div",{className:"space-y-2",children:[E.jsx("h1",{className:"text-7xl font-light text-slate-300",children:"404"}),E.jsx("div",{className:"h-0.5 w-16 bg-slate-200 mx-auto"})]}),E.jsxs("div",{className:"space-y-3",children:[E.jsx("h2",{className:"text-2xl font-medium text-slate-800",children:"Page Not Found"}),E.jsxs("p",{className:"text-slate-600 leading-relaxed",children:["The page ",E.jsxs("span",{className:"font-medium text-slate-700",children:['"',t,'"']})," could not be found in this application."]})]}),o&&s.isAuthenticated&&((a=s.user)==null?void 0:a.role)==="admin"&&E.jsx("div",{className:"mt-8 p-4 bg-slate-100 rounded-lg border border-slate-200",children:E.jsxs("div",{className:"flex items-start space-x-3",children:[E.jsx("div",{className:"flex-shrink-0 w-5 h-5 rounded-full bg-orange-100 flex items-center justify-center mt-0.5",children:E.jsx("div",{className:"w-2 h-2 rounded-full bg-orange-400"})}),E.jsxs("div",{className:"text-left space-y-1",children:[E.jsx("p",{className:"text-sm font-medium text-slate-700",children:"Admin Note"}),E.jsx("p",{className:"text-sm text-slate-600 leading-relaxed",children:"This could mean that the AI hasn't implemented this page yet. Ask it to implement it in the chat."})]})]})}),E.jsx("div",{className:"pt-6",children:E.jsxs("button",{onClick:()=>window.location.href="/",className:"inline-flex items-center px-4 py-2 text-sm font-medium text-slate-700 bg-white border border-slate-200 rounded-lg hover:bg-slate-50 hover:border-slate-300 transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-slate-500",children:[E.jsx("svg",{className:"w-4 h-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:E.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6"})}),"Go Home"]})})]})})})}const uv=_.createContext(),gb=({children:r})=>{const[t,s]=_.useState(null),[o,a]=_.useState(!1),[u,d]=_.useState(!0),[h,p]=_.useState(!0),[m,g]=_.useState(null),[v,C]=_.useState(!1),[L,F]=_.useState(null);_.useEffect(()=>{k()},[]);const k=async()=>{var P,A;try{p(!0),g(null);const V=zo({baseURL:"/api/apps/public",headers:{"X-App-Id":$o.appId},token:$o.token,interceptResponses:!0});try{const $=await V.get(`/prod/public-settings/by-id/${$o.appId}`);F($),$o.token?await w():(d(!1),a(!1),C(!0)),p(!1)}catch($){if(console.error("App state check failed:",$),$.status===403&&((A=(P=$.data)==null?void 0:P.extra_data)!=null&&A.reason)){const G=$.data.extra_data.reason;g(G==="auth_required"?{type:"auth_required",message:"Authentication required"}:G==="user_not_registered"?{type:"user_not_registered",message:"User not registered for this app"}:{type:G,message:$.message})}else g({type:"unknown",message:$.message||"Failed to load app"});p(!1),d(!1)}}catch(V){console.error("Unexpected error:",V),g({type:"unknown",message:V.message||"An unexpected error occurred"}),p(!1),d(!1)}},w=async()=>{try{d(!0);const P=await Vo.auth.me();s(P),a(!0),d(!1),C(!0)}catch(P){console.error("User auth check failed:",P),d(!1),a(!1),C(!0),(P.status===401||P.status===403)&&g({type:"auth_required",message:"Authentication required"})}},S=(P=!0)=>{s(null),a(!1),P?Vo.auth.logout(window.location.href):Vo.auth.logout()},I=()=>{Vo.auth.redirectToLogin(window.location.href)};return E.jsx(uv.Provider,{value:{user:t,isAuthenticated:o,isLoadingAuth:u,isLoadingPublicSettings:h,authError:m,appPublicSettings:L,authChecked:v,logout:S,navigateToLogin:I,checkUserAuth:w,checkAppState:k},children:r})},vb=()=>{const r=_.useContext(uv);if(!r)throw new Error("useAuth must be used within an AuthProvider");return r},wb=()=>E.jsx("div",{className:"flex flex-col items-center justify-center min-h-screen bg-gradient-to-b from-white to-slate-50",children:E.jsx("div",{className:"max-w-md w-full p-8 bg-white rounded-lg shadow-lg border border-slate-100",children:E.jsxs("div",{className:"text-center",children:[E.jsx("div",{className:"inline-flex items-center justify-center w-16 h-16 mb-6 rounded-full bg-orange-100",children:E.jsx("svg",{className:"w-8 h-8 text-orange-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:E.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})})}),E.jsx("h1",{className:"text-3xl font-bold text-slate-900 mb-4",children:"Access Restricted"}),E.jsx("p",{className:"text-slate-600 mb-8",children:"You are not registered to use this application. Please contact the app administrator to request access."}),E.jsxs("div",{className:"p-4 bg-slate-50 rounded-md text-sm text-slate-600",children:[E.jsx("p",{children:"If you believe this is an error, you can:"}),E.jsxs("ul",{className:"list-disc list-inside mt-2 space-y-1",children:[E.jsx("li",{children:"Verify you are logged in with the correct account"}),E.jsx("li",{children:"Contact the app administrator for access"}),E.jsx("li",{children:"Try logging out and back in again"})]})]})]})})}),xb=r=>{const t=r.slice(1);try{return decodeURIComponent(t)}catch{return t}};function Sb(){const{pathname:r,hash:t}=qs(),s=QE();return _.useEffect(()=>{if(s!=="POP"){if(t){const o=xb(t),a=window.setTimeout(()=>{var u;(u=document.getElementById(o))==null||u.scrollIntoView({behavior:"smooth"})},50);return()=>window.clearTimeout(a)}window.scrollTo({top:0,left:0,behavior:"instant"})}},[r,t,s]),null}const Um=[["Corporate","#article"],["Investments","#facts"],["News & Media","#related-releases"],["Contact","mailto:info@qprimeholding.com"]];function Eb(){const[r,t]=_.useState(!1);return E.jsxs("header",{className:"site-header print-hidden",children:[E.jsxs("div",{className:"site-container flex h-full items-center justify-between",children:[E.jsxs(id,{to:"/",className:"brand-mark","aria-label":"Alrazah home",children:["ALRAZAH ",E.jsx("span",{children:"Q.P.S.C."})]}),E.jsx("nav",{className:"hidden items-center gap-8 lg:flex","aria-label":"Primary navigation",children:Um.map(([s,o])=>E.jsx("a",{className:"nav-link",href:o,children:s},s))}),E.jsx("button",{className:"focus-ring p-2 lg:hidden",onClick:()=>t(!r),"aria-expanded":r,"aria-label":"Toggle navigation",children:r?E.jsx(Ny,{}):E.jsx(jx,{})})]}),r&&E.jsx("nav",{className:"mobile-nav site-container","aria-label":"Mobile navigation",children:Um.map(([s,o])=>E.jsx("a",{href:o,onClick:()=>t(!1),children:s},s))})]})}function _b(){return E.jsx("nav",{className:"border-b border-border bg-background print-hidden","aria-label":"Breadcrumb",children:E.jsxs("ol",{className:"site-container flex items-center gap-2 overflow-hidden py-5 text-xs font-semibold tracking-wide text-muted-foreground",children:[E.jsx("li",{children:E.jsx(id,{className:"focus-ring transition-colors hover:text-primary",to:"/",children:"Home"})}),E.jsx(Ju,{className:"h-3 w-3 shrink-0","aria-hidden":"true"}),E.jsx("li",{children:E.jsx("a",{className:"focus-ring transition-colors hover:text-primary",href:"#related-releases",children:"News & Media"})}),E.jsx(Ju,{className:"h-3 w-3 shrink-0","aria-hidden":"true"}),E.jsx("li",{children:E.jsx("a",{className:"focus-ring transition-colors hover:text-primary",href:"#related-releases",children:"Press Releases"})}),E.jsx(Ju,{className:"h-3 w-3 shrink-0","aria-hidden":"true"}),E.jsx("li",{className:"truncate text-primary","aria-current":"page",children:"Alrazah Holding Joins Landmark $380 Million Series D Round"})]})})}function kb(){return E.jsx("header",{className:"article-hero text-primary-foreground",children:E.jsxs("div",{className:"site-container flex min-h-[420px] flex-col justify-center py-14 md:py-20",children:[E.jsx("p",{className:"mb-5 text-xs font-bold tracking-[0.14em]",children:"PRESS RELEASE"}),E.jsx("h1",{className:"max-w-[1050px] font-heading text-[2rem] font-bold leading-[1.1] tracking-[-0.025em] md:text-[2.5rem] lg:text-5xl",children:"Alrazah Holding Joins Landmark $380 Million Series D Round for Nearfield Instruments to Advance Next-Generation Semiconductor Metrology"}),E.jsx("p",{className:"mt-7 text-[15px] text-primary-foreground/90",children:"22 June 2026"}),E.jsxs("div",{className:"mt-6 flex flex-wrap gap-x-8 gap-y-2 border-t border-primary-foreground/25 pt-5 text-[11px] font-bold tracking-[0.14em] text-primary-foreground/90",children:[E.jsx("span",{children:"DOHA · QATAR"}),E.jsx("span",{children:"ALRAZAH HOLDING"})]})]})})}const Cb=[["$380M Series D","Alrazah Holding participated in Nearfield Instruments' $380 million Series D financing round."],["$1.6B valuation","The transaction values Nearfield Instruments at $1.6 billion and is described as the largest-ever deep-tech financing round in the Netherlands."],["AI semiconductor infrastructure","The financing will accelerate advanced metrology, manufacturing capacity, customer support and development supporting next-generation semiconductor production."],["Global institutional syndicate","Alrazah joins a distinguished group of international investors and strategic institutions participating in the financing."]];function bb(){return E.jsxs("section",{className:"site-container py-16 md:py-20","aria-labelledby":"takeaways-title",children:[E.jsx("p",{className:"section-label",id:"takeaways-title",children:"KEY TAKEAWAYS"}),E.jsx("p",{className:"mt-4 max-w-4xl text-lg font-semibold leading-8",children:"Alrazah Holding joins a landmark $380 million Series D financing round supporting advanced semiconductor metrology and next-generation AI infrastructure."}),E.jsx("div",{className:"mt-8 grid border border-primary/30 sm:grid-cols-2 lg:grid-cols-4",children:Cb.map(([r,t],s)=>E.jsxs("div",{className:"takeaway-cell",children:[E.jsxs("span",{children:["0",s+1]}),E.jsx("h2",{children:r}),E.jsx("p",{children:t})]},r))})]})}const Rb=[["$380 MILLION","Series D financing"],["$1.6 BILLION","Nearfield Instruments valuation"],["22 JUN 2026","Announcement date"],["NETHERLANDS","Largest-ever deep-tech financing round described in the release"]];function Tb(){return E.jsx("section",{id:"facts",className:"my-12 grid border-y border-primary/30 sm:grid-cols-2","aria-label":"Transaction facts",children:Rb.map(([r,t],s)=>E.jsxs("div",{className:"fact-cell",children:[E.jsxs("span",{children:["0",s+1]}),E.jsx("strong",{children:r}),E.jsx("p",{children:t})]},r))})}function Pb(){return E.jsxs("article",{id:"article",className:"article-copy",children:[E.jsxs("p",{id:"overview",className:"article-lead",children:[E.jsx("strong",{children:"DOHA, State of Qatar – June 22, 2026 –"})," Alrazah Holding, a premier publicly listed investment entity on the Qatar Stock Exchange, joins Nearfield Instruments’ $380 million Series D financing round."]}),E.jsxs("section",{id:"investment",children:[E.jsx("h2",{children:"Catalyzing Innovation in the AI Semiconductor Ecosystem"}),E.jsxs("p",{children:["The financing values Nearfield Instruments at ",E.jsx("strong",{children:"$1.6 billion"})," and is described as the largest-ever deep-tech financing round in the Netherlands."]}),E.jsx("p",{children:"The capital will support Nearfield Instruments’ innovation roadmap, manufacturing expansion, Applications Centers of Excellence, customer support infrastructure and collaboration with semiconductor manufacturers."}),E.jsx("p",{children:"Alrazah is participating alongside Fidelity Management & Research Company, Temasek, Walden Catalyst Ventures, Innovation Industries, M&G Investments, Invest-NL, TNO Ventures and ING."})]}),E.jsx(Tb,{}),E.jsxs("aside",{className:"context-panel","aria-labelledby":"context-title",children:[E.jsx("p",{className:"section-label",id:"context-title",children:"INVESTING IN THE INFRASTRUCTURE OF THE AI ERA"}),E.jsx("p",{children:"Alrazah Holding’s participation in Nearfield Instruments’ Series D financing reflects its stated focus on identifying and supporting technology-enabled businesses positioned to serve the evolving requirements of advanced computing and semiconductor infrastructure."})]}),E.jsxs("section",{id:"nearfield",children:[E.jsx("h2",{children:"About Nearfield Instruments"}),E.jsx("p",{children:"Nearfield Instruments develops advanced 3D metrology and inspection technologies, including its proprietary QUADRA platform, for next-generation semiconductor manufacturing."}),E.jsx("p",{children:"Its capabilities include scanning probe microscopy, in-line nanometer-scale metrology and atomic force microscopy for high-volume manufacturing across advanced logic, memory and 3D IC packaging."}),E.jsx("p",{children:"The company has global operations, approximately 450 employees, and relationships with semiconductor manufacturers and research partners."})]})]})}const Ob=[["Overview","#overview"],["The investment","#investment"],["Key facts","#facts"],["About Nearfield Instruments","#nearfield"]];function Nb(){return E.jsxs("aside",{className:"sticky top-28 hidden self-start border-t border-primary pt-5 lg:block print:hidden","aria-label":"On this page",children:[E.jsx("p",{className:"section-label",children:"ON THIS PAGE"}),E.jsx("ol",{className:"mt-5 space-y-4 text-sm text-muted-foreground",children:Ob.map(([r,t],s)=>E.jsx("li",{children:E.jsxs("a",{className:"focus-ring group flex gap-4 transition-colors hover:text-primary",href:t,children:[E.jsxs("span",{className:"text-xs text-primary",children:["0",s+1]}),E.jsx("span",{children:r})]})},t))})]})}const zm="Alrazah Holding Joins Landmark $380 Million Series D Round for Nearfield Instruments";function Ab(){const[r,t]=_.useState(!1),s=typeof window>"u"?"":window.location.href,o=u=>window.open(u,"_blank","noopener,noreferrer,width=720,height=640"),a=async()=>{await navigator.clipboard.writeText(s),t(!0),setTimeout(()=>t(!1),1800)};return E.jsxs("div",{className:"article-utilities print-hidden",children:[E.jsx("span",{className:"section-label mr-2",children:"SHARE"}),E.jsx("button",{"aria-label":"Share on LinkedIn",onClick:()=>o(`https://www.linkedin.com/sharing/share-offsite/?url=${encodeURIComponent(s)}`),children:E.jsx(Ax,{})}),E.jsx("button",{"aria-label":"Share on X",onClick:()=>o(`https://twitter.com/intent/tweet?url=${encodeURIComponent(s)}&text=${encodeURIComponent(zm)}`),className:"font-bold",children:"X"}),E.jsx("button",{"aria-label":"Share on Facebook",onClick:()=>o(`https://www.facebook.com/sharer/sharer.php?u=${encodeURIComponent(s)}`),children:E.jsx(Tx,{})}),E.jsx("a",{"aria-label":"Share by email",href:`mailto:?subject=${encodeURIComponent(zm)}&body=${encodeURIComponent(s)}`,children:E.jsx(Ix,{})}),E.jsx("button",{"aria-label":"Copy link",onClick:a,children:E.jsx(Ox,{})}),E.jsx("span",{className:"text-xs text-muted-foreground",role:"status",children:r?"Copied":""}),E.jsxs("button",{className:"ml-auto gap-2 !w-auto px-3",onClick:()=>window.print(),children:[E.jsx(Fx,{})," ",E.jsx("span",{children:"Print"})]})]})}function Lb(){return E.jsx("section",{id:"related-releases",className:"bg-secondary py-16 md:py-20 print-hidden","aria-labelledby":"related-title",children:E.jsxs("div",{className:"site-container",children:[E.jsx("p",{className:"section-label",id:"related-title",children:"RELATED PRESS RELEASES"}),E.jsx("div",{className:"mt-8 border-y border-border py-10",children:E.jsx("p",{className:"max-w-xl text-base leading-7 text-muted-foreground",children:"No additional relevant press releases are included in the current approved content record."})})]})})}function Ib(){return E.jsx("section",{className:"bg-primary py-16 text-primary-foreground md:py-20 print-hidden","aria-labelledby":"stay-informed",children:E.jsxs("div",{className:"site-container flex flex-col justify-between gap-8 md:flex-row md:items-end",children:[E.jsxs("div",{children:[E.jsx("p",{className:"mb-4 text-xs font-bold tracking-[0.14em]",children:"CORPORATE NEWS"}),E.jsx("h2",{id:"stay-informed",className:"font-heading text-3xl font-bold md:text-4xl",children:"STAY INFORMED"}),E.jsx("p",{className:"mt-4 max-w-2xl text-base leading-7 text-primary-foreground/85",children:"Follow Alrazah’s latest corporate announcements, developments and institutional news."})]}),E.jsxs("div",{className:"flex flex-wrap gap-3",children:[E.jsx("a",{className:"cta-button bg-primary-foreground text-primary",href:"#related-releases",children:"View All Press Releases"}),E.jsx("a",{className:"cta-button border border-primary-foreground/60",href:"mailto:info@qprimeholding.com",children:"Contact Alrazah"})]})]})})}function Db(){return E.jsxs("footer",{className:"bg-foreground py-14 text-background print-hidden",children:[E.jsxs("div",{className:"site-container grid gap-10 border-b border-background/20 pb-12 md:grid-cols-[1.5fr_1fr_1fr]",children:[E.jsxs("div",{children:[E.jsx(id,{to:"/",className:"text-xl font-bold tracking-[0.14em]",children:"ALRAZAH"}),E.jsx("p",{className:"mt-4 max-w-sm text-sm leading-6 text-background/65",children:"A publicly listed investment entity rooted in Qatar and connected to international markets."})]}),E.jsxs("div",{children:[E.jsx("p",{className:"footer-label",children:"EXPLORE"}),E.jsx("a",{href:"#article",children:"Corporate"}),E.jsx("a",{href:"#facts",children:"Investments"}),E.jsx("a",{href:"#related-releases",children:"News & Media"})]}),E.jsxs("div",{children:[E.jsx("p",{className:"footer-label",children:"CONTACT"}),E.jsx("a",{href:"mailto:info@qprimeholding.com",children:"Contact Alrazah"}),E.jsx("p",{className:"mt-3 text-sm text-background/65",children:"Doha, State of Qatar"})]})]}),E.jsx("div",{className:"site-container pt-6 text-xs text-background/50",children:"© 2026 Alrazah Q.P.S.C. All rights reserved."})]})}function Bm(){return _.useEffect(()=>{const r="Alrazah Holding Joins $380 Million Nearfield Instruments Series D | Alrazah",t="Alrazah Holding joins Nearfield Instruments' $380 million Series D financing to advance semiconductor metrology and AI infrastructure.",o=`${window.location.origin}/news-media/press-release/alrazah-holding-joins-landmark-380-million-series-d-round-for-nearfield-instruments-to-advance-next-generation-semiconductor-metrology/`;document.title=r;const a=(h,p)=>{let m=document.head.querySelector(h);m||(m=document.createElement("meta"),document.head.appendChild(m)),Object.entries(p).forEach(([g,v])=>m.setAttribute(g,v))};a('meta[name="description"]',{name:"description",content:t}),a('meta[property="og:type"]',{property:"og:type",content:"article"}),a('meta[property="og:title"]',{property:"og:title",content:r}),a('meta[property="og:description"]',{property:"og:description",content:t}),a('meta[property="og:url"]',{property:"og:url",content:o}),a('meta[name="twitter:card"]',{name:"twitter:card",content:"summary"});let u=document.head.querySelector('link[rel="canonical"]');u||(u=document.createElement("link"),u.rel="canonical",document.head.appendChild(u)),u.href=o;const d=document.createElement("script");return d.type="application/ld+json",d.dataset.pressRelease="true",d.text=JSON.stringify({"@context":"https://schema.org","@type":"NewsArticle",headline:"Alrazah Holding Joins Landmark $380 Million Series D Round for Nearfield Instruments to Advance Next-Generation Semiconductor Metrology",datePublished:"2026-06-22",publisher:{"@type":"Organization",name:"Alrazah Holding"},articleSection:"Press Release",mainEntityOfPage:o,description:t}),document.head.appendChild(d),()=>d.remove()},[]),E.jsxs("div",{className:"min-h-screen bg-background text-foreground",children:[E.jsx(Eb,{}),E.jsx(_b,{}),E.jsxs("main",{children:[E.jsx(kb,{}),E.jsx(bb,{}),E.jsxs("div",{className:"site-container grid gap-20 pb-20 lg:grid-cols-[minmax(0,760px)_280px]",children:[E.jsxs("div",{children:[E.jsx(Pb,{}),E.jsx(Ab,{})]}),E.jsx(Nb,{})]}),E.jsx(Lb,{}),E.jsx(Ib,{})]}),E.jsx(Db,{})]})}const jb=()=>{const{isLoadingAuth:r,isLoadingPublicSettings:t,authError:s,navigateToLogin:o}=vb();if(t||r)return E.jsx("div",{className:"fixed inset-0 flex items-center justify-center",children:E.jsx("div",{className:"w-8 h-8 border-4 border-slate-200 border-t-slate-800 rounded-full animate-spin"})});if(s){if(s.type==="user_not_registered")return E.jsx(wb,{});if(s.type==="auth_required")return o(),null}return E.jsxs(d_,{children:[E.jsx(Aa,{path:"/",element:E.jsx(Bm,{})}),E.jsx(Aa,{path:"/news-media/press-release/alrazah-holding-joins-landmark-380-million-series-d-round-for-nearfield-instruments-to-advance-next-generation-semiconductor-metrology/",element:E.jsx(Bm,{})}),E.jsx(Aa,{path:"*",element:E.jsx(yb,{})})]})};function Mb(){return E.jsx(gb,{children:E.jsxs(sE,{client:gE,children:[E.jsxs(v_,{children:[E.jsx(Sb,{}),E.jsx(jb,{})]}),E.jsx(AS,{})]})})}g0.createRoot(document.getElementById("root")).render(E.jsx(Mb,{}));